# Class TCefResourceRequestHandlerRef

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFResourceRequestHandler

## Declaration

`type TCefResourceRequestHandlerRef = class(TCefBaseRefCountedRef, ICefResourceRequestHandler)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedRef
- TCefResourceRequestHandlerRef

## Overview

### Methods

| `procedure GetCookieAccessFilter(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; var aFilter: ICefCookieAccessFilter);`
| `function OnBeforeResourceLoad(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const callback: ICefCallback): TCefReturnValue;`
| `procedure GetResourceHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; var aResourceHandler : ICefResourceHandler);`
| `procedure OnResourceRedirect(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var newUrl: ustring);`
| `function OnResourceResponse(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse): Boolean;`
| `procedure GetResourceResponseFilter(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var aResponseFilter: ICefResponseFilter);`
| `procedure OnResourceLoadComplete(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; status: TCefUrlRequestStatus; receivedContentLength: Int64);`
| `procedure OnProtocolExecution(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; var allowOsExecution: Boolean);`
| `procedure RemoveReferences;`
| `class function UnWrap(data: Pointer): ICefResourceRequestHandler;`

## Description

### Methods

| `procedure GetCookieAccessFilter(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; var aFilter: ICefCookieAccessFilter);`

This item has no description. Showing description inherited from ICefResourceRequestHandler.GetCookieAccessFilter.

Called on the IO thread before a resource request is loaded. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. To optionally filter cookies for the request return a ICefCookieAccessFilter object. The |request| object cannot not be modified in this callback.

| `function OnBeforeResourceLoad(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const callback: ICefCallback): TCefReturnValue;`

This item has no description. Showing description inherited from ICefResourceRequestHandler.OnBeforeResourceLoad.

Called on the IO thread before a resource request is loaded. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. To redirect or change the resource load optionally modify |request|. Modification of the request URL will be treated as a redirect. Return RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC and call ICefCallback functions at a later time to continue or cancel the request asynchronously. Return RV_CANCEL to cancel the request immediately.

| `procedure GetResourceHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; var aResourceHandler : ICefResourceHandler);`

This item has no description. Showing description inherited from ICefResourceRequestHandler.GetResourceHandler.

Called on the IO thread before a resource is loaded. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. To allow the resource to load using the default network loader return NULL. To specify a handler for the resource return a ICefResourceHandler object. The |request| object cannot not be modified in this callback.

| `procedure OnResourceRedirect(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var newUrl: ustring);`

This item has no description. Showing description inherited from ICefResourceRequestHandler.OnResourceRedirect.

Called on the IO thread when a resource load is redirected. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. The |request| parameter will contain the old URL and other request-related information. The |response| parameter will contain the response that resulted in the redirect. The |new_url| parameter will contain the new URL and can be changed if desired. The |request| and |response| objects cannot be modified in this callback.

| `function OnResourceResponse(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse): Boolean;`

This item has no description. Showing description inherited from ICefResourceRequestHandler.OnResourceResponse.

Called on the IO thread when a resource response is received. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. To allow the resource load to proceed without modification return false (0). To redirect or retry the resource load optionally modify |request| and return true (1). Modification of the request URL will be treated as a redirect. Requests handled using the default network loader cannot be redirected in this callback. The |response| object cannot be modified in this callback.

WARNING: Redirecting using this function is deprecated. Use OnBeforeResourceLoad or GetResourceHandler to perform redirects.

| `procedure GetResourceResponseFilter(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var aResponseFilter: ICefResponseFilter);`

This item has no description. Showing description inherited from ICefResourceRequestHandler.GetResourceResponseFilter.

Called on the IO thread to optionally filter resource response content. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. |request| and |response| represent the request and response respectively and cannot be modified in this callback.

| `procedure OnResourceLoadComplete(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; status: TCefUrlRequestStatus; receivedContentLength: Int64);`

This item has no description. Showing description inherited from ICefResourceRequestHandler.OnResourceLoadComplete.

Called on the IO thread when a resource load has completed. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. |request| and |response| represent the request and response respectively and cannot be modified in this callback. |status| indicates the load completion status. |received_content_length| is the number of response bytes actually read. This function will be called for all requests, including requests that are aborted due to CEF shutdown or destruction of the associated browser. In cases where the associated browser is destroyed this callback may arrive after the ICefLifeSpanHandler.OnBeforeClose callback for that browser. The ICefFrame.IsValid function can be used to test for this situation, and care should be taken not to call |browser| or |frame| functions that modify state (like LoadURL, SendProcessMessage, etc.) if the frame is invalid.

| `procedure OnProtocolExecution(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; var allowOsExecution: Boolean);`

This item has no description. Showing description inherited from ICefResourceRequestHandler.OnProtocolExecution.

Called on the IO thread to handle requests for URLs with an unknown protocol component. The |browser| and |frame| values represent the source of the request, and may be NULL for requests originating from service workers or ICefUrlRequest. |request| cannot be modified in this callback. Set |allow_os_execution| to true (1) to attempt execution via the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.

| `procedure RemoveReferences;`
This item has no description. Showing description inherited from ICefResourceRequestHandler.RemoveReferences. Custom procedure to clear all references.

| `class function UnWrap(data: Pointer): ICefResourceRequestHandler;`
This item has no description.

Generated by PasDoc 0.17.0.snapshot.