# Class TCEFUrlRequestClientComponent

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFUrlRequestClientComponent

## Declaration

`type TCEFUrlRequestClientComponent = class(TComponent, ICEFUrlRequestClientEvents)`

## Description

The TCEFUrlRequestClientComponent class puts together all CEF URL request procedures, functions, properties and events in one place.

## Hierarchy

- TObject
- TPersistent
- TComponent
- TCEFUrlRequestClientComponent

## Overview

### Fields

Protected | `FClient: ICefUrlrequestClient;`
Protected | `FThreadID: TCefThreadId;`
Protected | `FComponentID: integer;`
Protected | `FOnRequestComplete: TOnRequestComplete;`
Protected | `FOnUploadProgress: TOnUploadProgress;`
Protected | `FOnDownloadProgress: TOnDownloadProgress;`
Protected | `FOnDownloadData: TOnDownloadData;`
Protected | `FOnGetAuthCredentials: TOnGetAuthCredentials;`
Protected | `FOnCreateURLRequest: TNotifyEvent;`

### Methods

Protected | `function GetComponentID: integer;`
Protected | `procedure doOnRequestComplete(const request: ICefUrlRequest);`
Protected | `procedure doOnUploadProgress(const request: ICefUrlRequest; current, total: Int64);`
Protected | `procedure doOnDownloadProgress(const request: ICefUrlRequest; current, total: Int64);`
Protected | `procedure doOnDownloadData(const request: ICefUrlRequest; data: Pointer; dataLength: NativeUInt);`
Protected | `function doOnGetAuthCredentials(isProxy: Boolean; const host: ustring; port: Integer; const realm, scheme: ustring; const callback: ICefAuthCallback): Boolean;`
Protected | `procedure doOnCreateURLRequest;`
Protected | `procedure DestroyRequestClient;`
Public | `constructor Create(AOwner: TComponent); override;`
Public | `procedure AfterConstruction; override;`
Public | `procedure BeforeDestruction; override;`
Public | `procedure AddURLRequest;`

### Properties

Public | `property Client : ICefUrlrequestClient read FClient;`
Public | `property ThreadID : TCefThreadId read FThreadID write FThreadID;`
Published | `property OnRequestComplete : TOnRequestComplete read FOnRequestComplete write FOnRequestComplete;`
Published | `property OnUploadProgress : TOnUploadProgress read FOnUploadProgress write FOnUploadProgress;`
Published | `property OnDownloadProgress : TOnDownloadProgress read FOnDownloadProgress write FOnDownloadProgress;`
Published | `property OnDownloadData : TOnDownloadData read FOnDownloadData write FOnDownloadData;`
Published | `property OnGetAuthCredentials : TOnGetAuthCredentials read FOnGetAuthCredentials write FOnGetAuthCredentials;`
Published | `property OnCreateURLRequest : TNotifyEvent read FOnCreateURLRequest write FOnCreateURLRequest;`

## Description

### Fields

Protected | `FClient: ICefUrlrequestClient;`
This item has no description.

Protected | `FThreadID: TCefThreadId;`
This item has no description.

Protected | `FComponentID: integer;`
This item has no description.

Protected | `FOnRequestComplete: TOnRequestComplete;`
This item has no description.

Protected | `FOnUploadProgress: TOnUploadProgress;`
This item has no description.

Protected | `FOnDownloadProgress: TOnDownloadProgress;`
This item has no description.

Protected | `FOnDownloadData: TOnDownloadData;`
This item has no description.

Protected | `FOnGetAuthCredentials: TOnGetAuthCredentials;`
This item has no description.

Protected | `FOnCreateURLRequest: TNotifyEvent;`
This item has no description.

### Methods

Protected | `function GetComponentID: integer;`
This item has no description.

Protected | `procedure doOnRequestComplete(const request: ICefUrlRequest);`
ICefUrlrequestClient

Protected | `procedure doOnUploadProgress(const request: ICefUrlRequest; current, total: Int64);`
This item has no description.

Protected | `procedure doOnDownloadProgress(const request: ICefUrlRequest; current, total: Int64);`
This item has no description.

Protected | `procedure doOnDownloadData(const request: ICefUrlRequest; data: Pointer; dataLength: NativeUInt);`
This item has no description.

Protected | `function doOnGetAuthCredentials(isProxy: Boolean; const host: ustring; port: Integer; const realm, scheme: ustring; const callback: ICefAuthCallback): Boolean;`
This item has no description.

Protected | `procedure doOnCreateURLRequest;`
Custom

Protected | `procedure DestroyRequestClient;`
This item has no description.

Public | `constructor Create(AOwner: TComponent); override;`
This item has no description.

Public | `procedure AfterConstruction; override;`
This item has no description.

Public | `procedure BeforeDestruction; override;`
This item has no description.

Public | `procedure AddURLRequest;`
Create the URLRequest in the context of TCEFUrlRequestClientComponent.ThreadId, which is the CEF UI thread by default.

### Properties

Public | `property Client : ICefUrlrequestClient read FClient;`
Returns the client.

Public | `property ThreadID : TCefThreadId read FThreadID write FThreadID;`
CEF thread used to create the URLRequest. Most of the client events will be executed on the same thread.

Published | `property OnRequestComplete : TOnRequestComplete read FOnRequestComplete write FOnRequestComplete;`
Notifies the client that the request has completed. Use the ICefUrlRequest.GetRequestStatus function to determine if the request was successful or not. This event will be called on the TCEFUrlRequestClientComponent.ThreadId thread, which is the CEF UI thread by default. <see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_urlrequest_capi.h">CEF source file: /include/capi/cef_urlrequest_capi.h (cef_urlrequest_client_t))

Published | `property OnUploadProgress : TOnUploadProgress read FOnUploadProgress write FOnUploadProgress;`
Notifies the client of upload progress. |current| denotes the number of bytes sent so far and |total| is the total size of uploading data (or -1 if chunked upload is enabled). This function will only be called if the UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. This event will be called on the TCEFUrlRequestClientComponent.ThreadId thread, which is the CEF UI thread by default. <see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_urlrequest_capi.h">CEF source file: /include/capi/cef_urlrequest_capi.h (cef_urlrequest_client_t))

Published | `property OnDownloadProgress : TOnDownloadProgress read FOnDownloadProgress write FOnDownloadProgress;`
Notifies the client of download progress. |current| denotes the number of bytes received up to the call and |total| is the expected total size of the response (or -1 if not determined). This event will be called on the TCEFUrlRequestClientComponent.ThreadId thread, which is the CEF UI thread by default. <see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_urlrequest_capi.h">CEF source file: /include/capi/cef_urlrequest_capi.h (cef_urlrequest_client_t))

Published | `property OnDownloadData : TOnDownloadData read FOnDownloadData write FOnDownloadData;`
Called when some part of the response is read. |data| contains the current bytes received since the last call. This function will not be called if the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. This event will be called on the TCEFUrlRequestClientComponent.ThreadId thread, which is the CEF UI thread by default. <see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_urlrequest_capi.h">CEF source file: /include/capi/cef_urlrequest_capi.h (cef_urlrequest_client_t))

Published | `property OnGetAuthCredentials : TOnGetAuthCredentials read FOnGetAuthCredentials write FOnGetAuthCredentials;`
Called on the IO thread when the browser needs credentials from the user. |isProxy| indicates whether the host is a proxy server. |host| contains the hostname and |port| contains the port number. Return true (1) to continue the request and call ICefAuthCallback.cont() when the authentication information is available. If the request has an associated browser/frame then returning false (0) will result in a call to GetAuthCredentials on the ICefRequestHandler associated with that browser, if any. Otherwise, returning false (0) will cancel the request immediately. This function will only be called for requests initiated from the browser process. This event will be called on the browser process CEF IO thread. <see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_urlrequest_capi.h">CEF source file: /include/capi/cef_urlrequest_capi.h (cef_urlrequest_client_t))

Published | `property OnCreateURLRequest : TNotifyEvent read FOnCreateURLRequest write FOnCreateURLRequest;`
Event triggered when the URLRequest has been created.

Generated by PasDoc 1.0.4.