public interface CefRequestHandler
限定符和类型 | 接口和说明 |
---|---|
static class |
CefRequestHandler.TerminationStatus
Process termination status values.
(处理终止状态值。)
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
getAuthCredentials(CefBrowser browser, CefFrame frame, 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.
(当浏览器需要用户的凭据时,在IO线程上调用。)
|
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.
(在启动资源请求之前在IO线程上调用。)
|
boolean |
onBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, boolean user_gesture, boolean is_redirect)
Called on the UI thread before browser navigation.
(浏览器导航之前在UI线程上调用。)
|
boolean |
onCertificateError(CefBrowser browser, CefLoadHandler.ErrorCode cert_error, java.lang.String request_url, CefRequestCallback callback)
Called on the UI thread to handle requests for URLs with an invalid SSL certificate.
(在UI线程上调用,以处理带有无效SSL证书的URL请求。)
|
void |
onPluginCrashed(CefBrowser browser, java.lang.String pluginPath)
Called on the browser process UI thread when a plugin has crashed.
(插件崩溃时在浏览器进程UI线程上调用。)
|
boolean |
onQuotaRequest(CefBrowser browser, java.lang.String origin_url, long new_size, CefRequestCallback callback)
Called on the IO thread when JavaScript requests a specific storage quota size via the webkitStorageInfo.requestQuota function.
(当JavaScript通过webkitStorageInfo.requestQuota函数请求特定的存储配额大小时,在IO线程上调用。)
|
void |
onRenderProcessTerminated(CefBrowser browser, CefRequestHandler.TerminationStatus status)
Called on the browser process UI thread when the render process terminates unexpectedly.
(当呈现进程意外终止时,在浏览器进程UI线程上调用。)
|
boolean getAuthCredentials(CefBrowser browser, CefFrame frame, boolean isProxy, java.lang.String host, int port, java.lang.String realm, java.lang.String scheme, CefAuthCallback callback)
browser
- The corresponding browser.
(-相应的浏览器。)
frame
- The frame generating the event. Instance only valid within the scope of this method.
(-生成事件的框架。实例仅在此方法的范围内有效。)
isProxy
- True if the host is a proxy server.
(-如果主机是代理服务器,则为true。)
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.
(-当身份验证信息可用时,调用CefAuthCallback.Continue()。)
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.
(-如果资源请求是导航,则为true。)
isDownload
- True if the resource request is a download.
(-如果资源请求是下载,则为true。)
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.
(-设置为true可禁用请求的默认处理,在这种情况下,需要通过CefResourceRequestHandler.getResourceHandler进行处理,否则将被取消。)
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.
(-如果请求是由用户手势发起的,则为True。)
is_redirect
- True if the request was redirected.
(-如果请求已重定向,则为true。)
boolean onCertificateError(CefBrowser browser, CefLoadHandler.ErrorCode cert_error, java.lang.String request_url, CefRequestCallback callback)
browser
- The corresponding browser.
(-相应的浏览器。)
cert_error
- Error code describing the error.
(-描述错误的错误代码。)
request_url
- The requesting URL.
(-请求的网址。)
callback
- Call CefRequestCallback.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.
(-使用此方法或在以后的时间调用CefRequestCallback.Continue()以继续或取消请求。如果为null,则无法从中恢复错误,该请求将自动取消。)
void onPluginCrashed(CefBrowser browser, java.lang.String pluginPath)
browser
- The corresponding browser.
(-相应的浏览器。)
pluginPath
- The path of the plugin that crashed.
(-崩溃的插件的路径。)
boolean onQuotaRequest(CefBrowser browser, java.lang.String origin_url, long new_size, CefRequestCallback callback)
browser
- The corresponding browser.
(-相应的浏览器。)
origin_url
- Origin of the page making the request.
(-发出请求的页面的来源。)
new_size
- Requested quota size in bytes.
(-请求的配额大小(以字节为单位)。)
callback
- Call CefRequestCallback.Continue() either in this method or at a later time to grant or deny the request.
(-使用此方法或以后的方法调用CefRequestCallback.Continue()以授予或拒绝该请求。)
void onRenderProcessTerminated(CefBrowser browser, CefRequestHandler.TerminationStatus status)
browser
- The corresponding browser.
(-相应的浏览器。)
status
- Indicates how the process was terminated.
(-指示进程如何终止。)