Click or drag to resize

IRequestContextHandler.GetResourceRequestHandler Method

Version 75.1.140
Called on the CEF IO thread before a resource request is initiated. This method will not be called if the client associated with browser returns a non-NULL value from GetResourceRequestHandler(IWebBrowser, IBrowser, IFrame, IRequest, Boolean, Boolean, String, Boolean) for the same request (identified by [!:IRequest.GetIdentifier]).

Namespace:  CefSharp
Assembly:  CefSharp (in CefSharp.dll) Version: 75.1.140.0 (75.1.140.0)
Syntax
IResourceRequestHandler GetResourceRequestHandler(
	IBrowser browser,
	IFrame frame,
	IRequest request,
	bool isNavigation,
	bool isDownload,
	string requestInitiator,
	ref bool disableDefaultHandling
)

Parameters

browser
Type: CefSharp.IBrowser
represent the source browser of the request, and may be null for requests originating from service workers.
frame
Type: CefSharp.IFrame
represent the source frame of the request, and may be null for requests originating from service workers.
request
Type: CefSharp.IRequest
represents the request contents and cannot be modified in this callback
isNavigation
Type: System.Boolean
will be true if the resource request is a navigation
isDownload
Type: System.Boolean
will be true if the resource request is a download
requestInitiator
Type: System.String
is the origin (scheme + domain) of the page that initiated the request
disableDefaultHandling
Type: System.Boolean
Set to true to disable default handling of the request, in which case it will need to be handled via GetResourceHandler(IWebBrowser, IBrowser, IFrame, IRequest) or it will be canceled

Return Value

Type: IResourceRequestHandler
To allow the resource load to proceed with default handling return null. To specify a handler for the resource return a IResourceRequestHandler object.
See Also