public abstract class CefRequestHandlerAdapter extends java.lang.Object implements CefRequestHandler
CefRequestHandler.TerminationStatus
构造器和说明 |
---|
CefRequestHandlerAdapter() |
限定符和类型 | 方法和说明 |
---|---|
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线程上调用。 |
CefResourceHandler |
getResourceHandler(CefBrowser browser, CefFrame frame, CefRequest request)
Called on the IO thread before a resource is loaded.
在加载资源之前调用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 |
onBeforeResourceLoad(CefBrowser browser, CefFrame frame, CefRequest request)
Called on the IO thread before a resource request is loaded.
在加载资源请求之前在IO线程上调用。 |
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线程上调用。 |
void |
onProtocolExecution(CefBrowser browser, java.lang.String url, BoolRef allow_os_execution)
Called on the UI thread to handle requests for URLs with an unknown protocol component.
在UI线程上调用以处理具有未知协议组件的URL的请求。 |
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线程上调用。 |
void |
onResourceLoadComplete(CefBrowser browser, CefFrame frame, CefRequest request, CefResponse response, CefURLRequest.Status status, long receivedContentLength)
Called on the IO thread when a resource load has completed.
资源加载完成后在IO线程上调用。 |
void |
onResourceRedirect(CefBrowser browser, CefFrame frame, CefRequest request, CefResponse response, StringRef new_url)
Called on the IO thread when a resource load is redirected.
重定向资源加载时在IO线程上调用。 |
boolean |
onResourceResponse(CefBrowser browser, CefFrame frame, CefRequest request, CefResponse response)
Called on the IO thread when a resource response is received.
收到资源响应时,在IO线程上调用。 |
public boolean getAuthCredentials(CefBrowser browser, CefFrame frame, boolean isProxy, java.lang.String host, int port, java.lang.String realm, java.lang.String scheme, CefAuthCallback callback)
CefRequestHandler
getAuthCredentials
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
frame
- The frame generating the event. Instance only valid within the scope of this method.
- 生成事件的帧。实例仅在此方法的范围内有效。
isProxy
- indicates whether the host is a proxy server.
- 指示主机是否是代理服务器。
host
- contains the hostname.
- 包含主机名。
port
- contains the port number.
- 包含端口号。
realm
- The realm of the request.
- 请求的领域。
scheme
- The scheme of the request.
- 请求的方案。
callback
- call CefAuthCallback::Continue() when the authentication information is available.
- 当身份验证信息可用时,调用CefAuthCallback :: Continue()。
public CefResourceHandler getResourceHandler(CefBrowser browser, CefFrame frame, CefRequest request)
CefRequestHandler
getResourceHandler
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
frame
- The frame generating the event. Instance only valid within the scope of this method.
- 生成事件的帧。实例仅在此方法的范围内有效。
request
- The request itself. Should not be modified in this callback.
- 请求本身。不应该在此回调中修改。
public boolean onBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, boolean user_gesture, boolean is_redirect)
CefRequestHandler
onBeforeBrowse
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
frame
- The frame generating the event. Instance only valid within the scope of this method.
- 生成事件的帧。实例仅在此方法的范围内有效。
request
- The request itself. Can't be modified.
- 请求本身。无法修改。
user_gesture
- true if the request was initiated by a user gesture.
- 如果请求是由用户手势发起的,则为true。
is_redirect
- true if the request was redirected.
- 如果请求被重定向,则为true。
public boolean onBeforeResourceLoad(CefBrowser browser, CefFrame frame, CefRequest request)
CefRequestHandler
onBeforeResourceLoad
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
frame
- The frame generating the event. Instance only valid within the scope of this method.
- 生成事件的帧。实例仅在此方法的范围内有效。
request
- The request object may be modified.
- 可以修改请求对象。
public boolean onCertificateError(CefBrowser browser, CefLoadHandler.ErrorCode cert_error, java.lang.String request_url, CefRequestCallback callback)
CefRequestHandler
onCertificateError
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
cert_error
- Error code describing the error.
- 描述错误的错误代码。
request_url
- The requesting URL.
- 请求URL。
callback
- call CefRequestCallback::Continue() to continue or cancel the request.
- 调用CefRequestCallback :: Continue()继续或取消请求。
public void onPluginCrashed(CefBrowser browser, java.lang.String pluginPath)
CefRequestHandler
onPluginCrashed
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
pluginPath
- the path of the plugin that crashed.
- 崩溃的插件的路径。
public void onProtocolExecution(CefBrowser browser, java.lang.String url, BoolRef allow_os_execution)
CefRequestHandler
onProtocolExecution
在接口中
CefRequestHandler
public boolean onQuotaRequest(CefBrowser browser, java.lang.String origin_url, long new_size, CefRequestCallback callback)
CefRequestHandler
onQuotaRequest
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
origin_url
- is the origin of the page making the request.
- 是发出请求的页面的来源。
new_size
- is the 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()以授予或拒绝请求。
public void onRenderProcessTerminated(CefBrowser browser, CefRequestHandler.TerminationStatus status)
CefRequestHandler
onRenderProcessTerminated
在接口中
CefRequestHandler
public void onResourceLoadComplete(CefBrowser browser, CefFrame frame, CefRequest request, CefResponse response, CefURLRequest.Status status, long receivedContentLength)
CefRequestHandler
onResourceLoadComplete
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
frame
- The frame generating the event. Instance only valid within the scope of this method.
- 生成事件的帧。实例仅在此方法的范围内有效。
request
- The request itself. Should not be modified in this callback.
- 请求本身。不应该在此回调中修改。
response
- The response that resulted in the redirect. Should not be modified in this callback.
- 导致重定向的响应。不应该在此回调中修改。
status
- The load completion status
- 负载完成状态
receivedContentLength
- The number of bytes read
- 读取的字节数
public void onResourceRedirect(CefBrowser browser, CefFrame frame, CefRequest request, CefResponse response, StringRef new_url)
CefRequestHandler
onResourceRedirect
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
frame
- The frame generating the event. Instance only valid within the scope of this method.
- 生成事件的帧。实例仅在此方法的范围内有效。
request
- The request itself. Should not be modified in this callback.
- 请求本身。不应该在此回调中修改。
response
- The response that resulted in the redirect. Should not be modified in this callback.
- 导致重定向的响应。不应该在此回调中修改。
new_url
- Contains the new URL and can be changed if desired.
- 包含新URL,如果需要可以更改。
public boolean onResourceResponse(CefBrowser browser, CefFrame frame, CefRequest request, CefResponse response)
CefRequestHandler
onResourceResponse
在接口中
CefRequestHandler
browser
- The corresponding browser.
- 相应的浏览器。
frame
- The frame generating the event. Instance only valid within the scope of this method.
- 生成事件的帧。实例仅在此方法的范围内有效。
request
- The request itself. To redirect or retry the resource modify |request| (url, headers or post body) and return true
- 请求本身。要重定向或重试资源修改|请求| (网址,标题或帖子正文)并返回true
response
- The response that resulted in the redirect. Should not be modified in this callback.
- 导致重定向的响应。不应该在此回调中修改。