public interface CefRequestHandler
| Modifier and Type | Interface and Description |
|---|---|
static class |
CefRequestHandler.TerminationStatus
Process termination status values.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAuthCredentials(CefBrowser browser,
java.lang.String origin_url,
boolean isProxy,
java.lang.String host,
int port,
java.lang.String realm,
java.lang.String scheme,
CefAuthCallback callback)
Called on the IO thread when the browser needs credentials from the user.
|
CefResourceRequestHandler |
getResourceRequestHandler(CefBrowser browser,
CefFrame frame,
CefRequest request,
boolean isNavigation,
boolean isDownload,
java.lang.String requestInitiator,
BoolRef disableDefaultHandling)
Called on the IO thread before a resource request is initiated.
|
boolean |
onBeforeBrowse(CefBrowser browser,
CefFrame frame,
CefRequest request,
boolean user_gesture,
boolean is_redirect)
Called on the UI thread before browser navigation.
|
boolean |
onCertificateError(CefBrowser browser,
CefLoadHandler.ErrorCode cert_error,
java.lang.String request_url,
CefCallback callback)
Called on the UI thread to handle requests for URLs with an invalid SSL certificate.
|
boolean |
onOpenURLFromTab(CefBrowser browser,
CefFrame frame,
java.lang.String target_url,
boolean user_gesture)
Called on the UI thread before OnBeforeBrowse in certain limited cases
where navigating a new or different browser might be desirable.
|
void |
onRenderProcessTerminated(CefBrowser browser,
CefRequestHandler.TerminationStatus status,
int error_code,
java.lang.String error_string)
Called on the browser process UI thread when the render process terminates unexpectedly.
|
boolean getAuthCredentials(CefBrowser browser, java.lang.String origin_url, boolean isProxy, java.lang.String host, int port, java.lang.String realm, java.lang.String scheme, CefAuthCallback callback)
browser - The corresponding browser.origin_url - The origin making this authentication request.isProxy - True if the host is a proxy server.host - Hostname.port - Port number.realm - Realm of the request.scheme - Scheme of the request.callback - Call CefAuthCallback.Continue() when the authentication information is
available.CefResourceRequestHandler getResourceRequestHandler(CefBrowser browser, CefFrame frame, CefRequest request, boolean isNavigation, boolean isDownload, java.lang.String requestInitiator, BoolRef disableDefaultHandling)
browser - The corresponding browser.frame - The frame generating the event. Instance only valid within the scope of this
method.request - The request itself. Cannot be modified in this callback. Instance only valid
within the scope of this method.isNavigation - True if the resource request is a navigation.isDownload - True if the resource request is a download.requestInitiator - The origin (scheme + domain) of the page that initiated the request.disableDefaultHandling - Set to true to disable default handling of the request, in
which case it will need to be handled via
CefResourceRequestHandler.getResourceHandler or it will be canceled.boolean onBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, boolean user_gesture, boolean is_redirect)
browser - The corresponding browser.frame - The frame generating the event. Instance only valid within the scope of this
method.request - The request itself. Cannot be modified in this callback. Instance only valid
within the scope of this method.user_gesture - True if the request was initiated by a user gesture.is_redirect - True if the request was redirected.boolean onCertificateError(CefBrowser browser, CefLoadHandler.ErrorCode cert_error, java.lang.String request_url, CefCallback callback)
browser - The corresponding browser.cert_error - Error code describing the error.request_url - The requesting URL.callback - Call CefCallback.Continue() either in this method or at a later time
to continue or cancel the request. If null the error cannot be recovered from and the
request will be canceled automatically.boolean onOpenURLFromTab(CefBrowser browser, CefFrame frame, java.lang.String target_url, boolean user_gesture)
browser - The corresponding browser.frame - The frame generating the event. Instance only valid within the scope of this
methoduser_gesture - True if the request was initiated by a user gesture.void onRenderProcessTerminated(CefBrowser browser, CefRequestHandler.TerminationStatus status, int error_code, java.lang.String error_string)
browser - The corresponding browser.status - Indicates how the process was terminated.error_code - The process error code.error_string - A string description of the error.