public class CefClient extends CefClientHandler implements CefContextMenuHandler, CefDialogHandler, CefDisplayHandler, CefDownloadHandler, CefDragHandler, CefFocusHandler, CefGeolocationHandler, CefJSDialogHandler, CefKeyboardHandler, CefLifeSpanHandler, CefLoadHandler, CefRenderHandler, CefRequestHandler, CefWindowHandler
CefContextMenuHandler.EventFlagsCefDialogHandler.FileDialogModeCefDragHandler.DragOperationMaskCefFocusHandler.FocusSourceCefJSDialogHandler.JSDialogTypeCefKeyboardHandler.CefKeyEventCefLoadHandler.ErrorCodeCefRequestHandler.TerminationStatus| 限定符和类型 | 方法和说明 |
|---|---|
CefClient |
addContextMenuHandler(CefContextMenuHandler handler) |
CefClient |
addDialogHandler(CefDialogHandler handler) |
CefClient |
addDisplayHandler(CefDisplayHandler handler) |
CefClient |
addDownloadHandler(CefDownloadHandler handler) |
CefClient |
addDragHandler(CefDragHandler handler) |
CefClient |
addFocusHandler(CefFocusHandler handler) |
CefClient |
addGeolocationHandler(CefGeolocationHandler handler) |
CefClient |
addJSDialogHandler(CefJSDialogHandler handler) |
CefClient |
addKeyboardHandler(CefKeyboardHandler handler) |
CefClient |
addLifeSpanHandler(CefLifeSpanHandler handler) |
CefClient |
addLoadHandler(CefLoadHandler handler) |
void |
addMessageRouter(CefMessageRouter messageRouter) |
CefClient |
addRequestHandler(CefRequestHandler handler) |
CefBrowser |
createBrowser(String url,
boolean isOffscreenRendered,
boolean isTransparent) |
CefBrowser |
createBrowser(String url,
boolean isOffscreenRendered,
boolean isTransparent,
CefRequestContext context) |
void |
dispose() |
boolean |
doClose(CefBrowser browser)
Called when a browser has received a request to close.
|
protected Object[] |
getAllBrowser()
Returns a list of all browser instances.
|
boolean |
getAuthCredentials(CefBrowser browser,
boolean isProxy,
String host,
int port,
String realm,
String scheme,
CefAuthCallback callback)
Called on the IO thread when the browser needs credentials from the user.
|
protected CefBrowser |
getBrowser(int identifier)
Returns the java part of the browser implementation.
|
protected CefContextMenuHandler |
getContextMenuHandler()
Return the handler for context menus.
|
protected CefDialogHandler |
getDialogHandler()
Return the handler for dialogs.
|
protected CefDisplayHandler |
getDisplayHandler()
Return the handler for browser display state events.
|
protected CefDownloadHandler |
getDownloadHandler()
Return the handler for download events.
|
protected CefDragHandler |
getDragHandler()
Return the handler for drag events.
|
protected CefFocusHandler |
getFocusHandler()
Return the handler for focus events.
|
protected CefGeolocationHandler |
getGeolocationHandler()
Return the handler for geolocation requests.
|
protected CefJSDialogHandler |
getJSDialogHandler()
Return the handler for javascript dialog requests.
|
protected CefKeyboardHandler |
getKeyboardHandler()
Return the handler for keyboard events.
|
protected CefLifeSpanHandler |
getLifeSpanHandler()
Return the handler for browser life span events.
|
protected CefLoadHandler |
getLoadHandler()
Return the handler for browser load status events.
|
Rectangle |
getRect(CefBrowser browser)
Retrieve the view rectangle.
|
protected CefRenderHandler |
getRenderHandler()
Return the handler for off-screen rendering events.
|
protected CefRequestHandler |
getRequestHandler()
Return the handler for browser request events.
|
CefResourceHandler |
getResourceHandler(CefBrowser browser,
CefRequest request)
Called on the IO thread before a resource is loaded.
|
Point |
getScreenPoint(CefBrowser browser,
Point viewPoint)
Retrieve the screen point for the specified view point.
|
Rectangle |
getViewRect(CefBrowser browser)
Retrieve the view rectangle.
|
protected CefWindowHandler |
getWindowHandler()
Return the handler for windowed rendering events.
|
void |
onAddressChange(CefBrowser browser,
String url)
Handle address changes.
|
void |
onAfterCreated(CefBrowser browser)
Handle creation of a new browser window.
|
boolean |
onBeforeBrowse(CefBrowser browser,
CefRequest request,
boolean is_redirect)
Called on the UI thread before browser navigation.
|
void |
onBeforeClose(CefBrowser browser)
Called just before a browser is destroyed.
|
void |
onBeforeContextMenu(CefBrowser browser,
CefContextMenuParams params,
CefMenuModel model)
Called before a context menu is displayed.
|
void |
onBeforeDownload(CefBrowser browser,
CefDownloadItem downloadItem,
String suggestedName,
CefBeforeDownloadCallback callback)
Called before a download begins.
|
boolean |
onBeforePopup(CefBrowser browser,
String target_url,
String target_frame_name)
Called on the IO thread before a new popup window is created.
|
boolean |
onBeforeResourceLoad(CefBrowser browser,
CefRequest request)
Called on the IO thread before a resource request is loaded.
|
boolean |
onBeforeUnloadDialog(CefBrowser browser,
String message_text,
boolean is_reload,
CefJSDialogCallback callback)
Called to run a dialog asking the user if they want to leave a page.
|
void |
onCancelGeolocationPermission(CefBrowser browser,
int request_id)
Called when a geolocation access request is canceled.
|
boolean |
onCertificateError(CefBrowser browser,
CefLoadHandler.ErrorCode cert_error,
String request_url,
CefRequestCallback callback)
Called on the UI thread to handle requests for URLs with an invalid
SSL certificate.
|
boolean |
onConsoleMessage(CefBrowser browser,
String message,
String source,
int line)
Called to display a console message.
|
boolean |
onContextMenuCommand(CefBrowser browser,
CefContextMenuParams params,
int commandId,
int eventFlags)
Called to execute a command selected from the context menu.
|
void |
onContextMenuDismissed(CefBrowser browser)
Called when the context menu is dismissed irregardless of whether the menu
was empty or a command was selected.
|
void |
onCursorChange(CefBrowser browser,
int cursorType)
Handle cursor changes.
|
void |
onDialogClosed(CefBrowser browser)
Called when the default implementation dialog is closed.
|
void |
onDownloadUpdated(CefBrowser browser,
CefDownloadItem downloadItem,
CefDownloadItemCallback callback)
Called when a download's status or progress information has been updated.
|
boolean |
onDragEnter(CefBrowser browser,
CefDragData dragData,
int mask)
Called when an external drag event enters the browser window.
|
boolean |
onFileDialog(CefBrowser browser,
CefDialogHandler.FileDialogMode mode,
String title,
String defaultFilePath,
Vector<String> acceptFilters,
int selectedAcceptFilter,
CefFileDialogCallback callback)
Called to run a file chooser dialog.
|
void |
onGotFocus(CefBrowser browser)
Called when the browser component has received focus.
|
boolean |
onJSDialog(CefBrowser browser,
String origin_url,
String accept_lang,
CefJSDialogHandler.JSDialogType dialog_type,
String message_text,
String default_prompt_text,
CefJSDialogCallback callback,
BoolRef suppress_message)
Called to run a JavaScript dialog.
|
boolean |
onKeyEvent(CefBrowser browser,
CefKeyboardHandler.CefKeyEvent event)
Called after the renderer and JavaScript in the page has had a chance to
handle the event.
|
void |
onLoadEnd(CefBrowser browser,
int frameIdentifier,
int httpStatusCode)
Called when the browser is done loading a frame.
|
void |
onLoadError(CefBrowser browser,
int frameIdentifer,
CefLoadHandler.ErrorCode errorCode,
String errorText,
String failedUrl)
Called when the resource load for a navigation fails or is canceled.
|
void |
onLoadingStateChange(CefBrowser browser,
boolean isLoading,
boolean canGoBack,
boolean canGoForward)
Called when the loading state has changed.
|
void |
onLoadStart(CefBrowser browser,
int frameIdentifer)
Called when the browser begins loading a frame.
|
void |
onMouseEvent(CefBrowser browser,
int event,
int screenX,
int screenY,
int modifier,
int button)
Implement this method to handle mouse events on Windows.
|
void |
onPaint(CefBrowser browser,
boolean popup,
Rectangle[] dirtyRects,
ByteBuffer buffer,
int width,
int height)
Handle painting.
|
void |
onPluginCrashed(CefBrowser browser,
String pluginPath)
Called on the browser process UI thread when a plugin has crashed.
|
void |
onPopupShow(CefBrowser browser,
boolean show)
Show or hide the popup window.
|
void |
onPopupSize(CefBrowser browser,
Rectangle size)
Size the popup window.
|
boolean |
onPreKeyEvent(CefBrowser browser,
CefKeyboardHandler.CefKeyEvent event,
BoolRef is_keyboard_shortcut)
Called before a keyboard event is sent to the renderer.
|
void |
onProtocolExecution(CefBrowser browser,
String url,
BoolRef allow_os_execution)
Called on the UI thread to handle requests for URLs with an unknown
protocol component.
|
boolean |
onQuotaRequest(CefBrowser browser,
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.
|
void |
onRenderProcessTerminated(CefBrowser browser,
CefRequestHandler.TerminationStatus status)
Called on the browser process UI thread when the render process
terminates unexpectedly.
|
boolean |
onRequestGeolocationPermission(CefBrowser browser,
String requesting_url,
int request_id,
CefGeolocationCallback callback)
Called when a page requests permission to access geolocation information.
|
void |
onResetDialogState(CefBrowser browser)
Called to cancel any pending dialogs and reset any saved dialog state.
|
void |
onResourceRedirect(CefBrowser browser,
CefRequest request,
StringRef new_url)
Called on the IO thread when a resource load is redirected.
|
boolean |
onSetFocus(CefBrowser browser,
CefFocusHandler.FocusSource source)
Called when the browser component is requesting focus.
|
void |
onStatusMessage(CefBrowser browser,
String value)
Called when the browser receives a status message.
|
void |
onTakeFocus(CefBrowser browser,
boolean next)
Called when the browser component is about to loose focus.
|
void |
onTitleChange(CefBrowser browser,
String title)
Handle title changes.
|
boolean |
onTooltip(CefBrowser browser,
String text)
Called when the browser is about to display a tooltip.
|
void |
removeContextMenuHandler() |
void |
removeDialogHandler() |
void |
removeDisplayHandler() |
void |
removeDownloadHandler() |
void |
removeDragHandler() |
void |
removeFocusHandler() |
void |
removeGeolocationHandler() |
void |
removeJSDialogHandler() |
void |
removeKeyboardHandler() |
void |
removeLifeSpanHandler() |
void |
removeLoadHandler() |
void |
removeMessageRouter(CefMessageRouter messageRouter) |
void |
removeRequestHandler() |
boolean |
runModal(CefBrowser browser)
Called when a modal window is about to display and the modal loop should
begin running.
|
boolean |
startDragging(CefBrowser browser,
CefDragData dragData,
int mask,
int x,
int y)
Called when the user starts dragging content in the web view.
|
void |
updateDragCursor(CefBrowser browser,
int operation)
Called when the web view wants to update the mouse cursor during a
drag & drop operation.
|
getNativeRef, removeContextMenuHandler, removeDialogHandler, removeDisplayHandler, removeDownloadHandler, removeDragHandler, removeFocusHandler, removeGeolocationHandler, removeJSDialogHandler, removeKeyboardHandler, removeLifeSpanHandler, removeLoadHandler, removeRenderHandler, removeRequestHandler, removeWindowHandler, setNativeRefpublic void dispose()
dispose 在类中 CefClientHandlerpublic CefBrowser createBrowser(String url, boolean isOffscreenRendered, boolean isTransparent)
public CefBrowser createBrowser(String url, boolean isOffscreenRendered, boolean isTransparent, CefRequestContext context)
protected CefBrowser getBrowser(int identifier)
CefClientHandlergetBrowser 在类中 CefClientHandlerprotected Object[] getAllBrowser()
CefClientHandlergetAllBrowser 在类中 CefClientHandlerprotected CefContextMenuHandler getContextMenuHandler()
CefClientHandlergetContextMenuHandler 在类中 CefClientHandlerprotected CefDialogHandler getDialogHandler()
CefClientHandlergetDialogHandler 在类中 CefClientHandlerprotected CefDisplayHandler getDisplayHandler()
CefClientHandlergetDisplayHandler 在类中 CefClientHandlerprotected CefDownloadHandler getDownloadHandler()
CefClientHandlergetDownloadHandler 在类中 CefClientHandlerprotected CefDragHandler getDragHandler()
CefClientHandlergetDragHandler 在类中 CefClientHandlerprotected CefFocusHandler getFocusHandler()
CefClientHandlergetFocusHandler 在类中 CefClientHandlerprotected CefGeolocationHandler getGeolocationHandler()
CefClientHandlergetGeolocationHandler 在类中 CefClientHandlerprotected CefJSDialogHandler getJSDialogHandler()
CefClientHandlergetJSDialogHandler 在类中 CefClientHandlerprotected CefKeyboardHandler getKeyboardHandler()
CefClientHandlergetKeyboardHandler 在类中 CefClientHandlerprotected CefLifeSpanHandler getLifeSpanHandler()
CefClientHandlergetLifeSpanHandler 在类中 CefClientHandlerprotected CefLoadHandler getLoadHandler()
CefClientHandlergetLoadHandler 在类中 CefClientHandlerprotected CefRenderHandler getRenderHandler()
CefClientHandlergetRenderHandler 在类中 CefClientHandlerprotected CefRequestHandler getRequestHandler()
CefClientHandlergetRequestHandler 在类中 CefClientHandlerprotected CefWindowHandler getWindowHandler()
CefClientHandlergetWindowHandler 在类中 CefClientHandlerpublic CefClient addContextMenuHandler(CefContextMenuHandler handler)
public void removeContextMenuHandler()
public void onBeforeContextMenu(CefBrowser browser, CefContextMenuParams params, CefMenuModel model)
CefContextMenuHandleronBeforeContextMenu 在接口中 CefContextMenuHandlerbrowser - The corresponding browser.params - provides information about the context menu state.model - can be cleared to show no context menu or modified
to show a custom menu.public boolean onContextMenuCommand(CefBrowser browser, CefContextMenuParams params, int commandId, int eventFlags)
CefContextMenuHandleronContextMenuCommand 在接口中 CefContextMenuHandlerbrowser - The corresponding browser.params - Will have the same values as what was passed to onBeforeContextMenu().commandId - The id of the command.eventFlags - A combination of event flags defined in EventFlagspublic void onContextMenuDismissed(CefBrowser browser)
CefContextMenuHandleronContextMenuDismissed 在接口中 CefContextMenuHandlerbrowser - The corresponding browser.public CefClient addDialogHandler(CefDialogHandler handler)
public void removeDialogHandler()
public boolean onFileDialog(CefBrowser browser, CefDialogHandler.FileDialogMode mode, String title, String defaultFilePath, Vector<String> acceptFilters, int selectedAcceptFilter, CefFileDialogCallback callback)
CefDialogHandleronFileDialog 在接口中 CefDialogHandlermode - represents the type of dialog to display.title - to be used for the dialog and may be empty to show the default
title ("Open" or "Save" depending on the mode).defaultFilePath - is the path with optional directory and/or file name
component that should be initially selected in the dialog.acceptFilters - are used to restrict the selectable file types and may
any combination of (a) valid lower-cased MIME types (e.g. "text/*" or
"image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c)
combined description and file extension delimited using "|" and ";" (e.g.
"Image Types|.png;.gif;.jpg").selectedAcceptFilter - is the 0-based index of the filter that should
be selected by default.callback - is a callback handler for handling own file dialogs.public CefClient addDisplayHandler(CefDisplayHandler handler)
public void removeDisplayHandler()
public void onAddressChange(CefBrowser browser, String url)
CefDisplayHandleronAddressChange 在接口中 CefDisplayHandlerbrowser - The browser generating the event.url - The new address.public void onTitleChange(CefBrowser browser, String title)
CefDisplayHandleronTitleChange 在接口中 CefDisplayHandlerbrowser - The browser generating the event.title - The new title.public boolean onTooltip(CefBrowser browser, String text)
CefDisplayHandleronTooltip 在接口中 CefDisplayHandlerbrowser - The browser generating the event.text - Contains the text that will be displayed in the tooltip.public void onStatusMessage(CefBrowser browser, String value)
CefDisplayHandleronStatusMessage 在接口中 CefDisplayHandlerbrowser - The browser generating the event.value - Contains the text that will be displayed in the status message.public boolean onConsoleMessage(CefBrowser browser, String message, String source, int line)
CefDisplayHandleronConsoleMessage 在接口中 CefDisplayHandlerbrowser - The browser generating the event.public CefClient addDownloadHandler(CefDownloadHandler handler)
public void removeDownloadHandler()
public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, String suggestedName, CefBeforeDownloadCallback callback)
CefDownloadHandleronBeforeDownload 在接口中 CefDownloadHandlerbrowser - The desired browser.downloadItem - The item to be downloaded. Do not keep a reference to it outside this method.suggestedName - is the suggested name for the download file.callback - start the download by calling the Continue methodpublic void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback)
CefDownloadHandleronDownloadUpdated 在接口中 CefDownloadHandlerbrowser - The desired browser.downloadItem - The downloading item.callback - Execute callback to cancel the downloadpublic CefClient addDragHandler(CefDragHandler handler)
public void removeDragHandler()
public boolean onDragEnter(CefBrowser browser, CefDragData dragData, int mask)
CefDragHandleronDragEnter 在接口中 CefDragHandlerbrowser - The corresponding browser.dragData - contains the drag event datamask - represents the type of drag operation. See DragOperationMask for possible values.public CefClient addFocusHandler(CefFocusHandler handler)
public void removeFocusHandler()
public void onTakeFocus(CefBrowser browser, boolean next)
CefFocusHandleronTakeFocus 在接口中 CefFocusHandlerbrowser - The browser generating the event.next - will be true if the browser is giving focus to the
next component and false if the browser is giving focus
to the previous component.public boolean onSetFocus(CefBrowser browser, CefFocusHandler.FocusSource source)
CefFocusHandleronSetFocus 在接口中 CefFocusHandlerbrowser - The browser generating the event.source - indicates/ where the focus request is originating from.public void onGotFocus(CefBrowser browser)
CefFocusHandleronGotFocus 在接口中 CefFocusHandlerbrowser - The browser generating the event.public CefClient addGeolocationHandler(CefGeolocationHandler handler)
public void removeGeolocationHandler()
public boolean onRequestGeolocationPermission(CefBrowser browser, String requesting_url, int request_id, CefGeolocationCallback callback)
CefGeolocationHandleronRequestGeolocationPermission 在接口中 CefGeolocationHandlerbrowser - The corresponding browser.requesting_url - is the URL requesting permission.request_id - is the unique ID for the permission request.callback - Call CefGeolocationCallback.Continue to allow or deny the
permission request.public void onCancelGeolocationPermission(CefBrowser browser, int request_id)
CefGeolocationHandleronCancelGeolocationPermission 在接口中 CefGeolocationHandlerbrowser - The corresponding browser.request_id - is the unique ID for the permission request.public CefClient addJSDialogHandler(CefJSDialogHandler handler)
public void removeJSDialogHandler()
public boolean onJSDialog(CefBrowser browser, String origin_url, String accept_lang, CefJSDialogHandler.JSDialogType dialog_type, String message_text, String default_prompt_text, CefJSDialogCallback callback, BoolRef suppress_message)
CefJSDialogHandleronJSDialog 在接口中 CefJSDialogHandlerbrowser - The corresponding browser.origin_url - The originating url.accept_lang - the accepted language.dialog_type - the dialog type.message_text - the text to be displayed.default_prompt_text - value will be specified for prompt dialogs only.callback - execute callback once the custom dialog is dismissed.suppress_message - set to true to suppress displaying the message.public boolean onBeforeUnloadDialog(CefBrowser browser, String message_text, boolean is_reload, CefJSDialogCallback callback)
CefJSDialogHandleronBeforeUnloadDialog 在接口中 CefJSDialogHandlerbrowser - The corresponding browser.message_text - The text to be displayed.is_reload - true if the page is reloaded.callback - execute callback once the custom dialog is dismissed.public void onResetDialogState(CefBrowser browser)
CefJSDialogHandleronResetDialogState 在接口中 CefJSDialogHandlerpublic void onDialogClosed(CefBrowser browser)
CefJSDialogHandleronDialogClosed 在接口中 CefJSDialogHandlerpublic CefClient addKeyboardHandler(CefKeyboardHandler handler)
public void removeKeyboardHandler()
public boolean onPreKeyEvent(CefBrowser browser, CefKeyboardHandler.CefKeyEvent event, BoolRef is_keyboard_shortcut)
CefKeyboardHandleronPreKeyEvent 在接口中 CefKeyboardHandlerbrowser - the corresponding browser.event - contains information about the keyboard event.is_keyboard_shortcut - set to true and return false, if
the event will be handled in OnKeyEvent() as a keyboard shortcut.public boolean onKeyEvent(CefBrowser browser, CefKeyboardHandler.CefKeyEvent event)
CefKeyboardHandleronKeyEvent 在接口中 CefKeyboardHandlerbrowser - the corresponding browser.event - contains information about the keyboard event.public CefClient addLifeSpanHandler(CefLifeSpanHandler handler)
public void removeLifeSpanHandler()
public boolean onBeforePopup(CefBrowser browser, String target_url, String target_frame_name)
CefLifeSpanHandleronBeforePopup 在接口中 CefLifeSpanHandlerbrowser - The source of the popup request.target_url - May be empty if none is specified with the request.target_frame_name - May be empty if none is specified with the request.public void onAfterCreated(CefBrowser browser)
CefLifeSpanHandleronAfterCreated 在接口中 CefLifeSpanHandlerbrowser - The browser generating the event.public boolean runModal(CefBrowser browser)
CefLifeSpanHandlerrunModal 在接口中 CefLifeSpanHandlerbrowser - The browser generating the event.public boolean doClose(CefBrowser browser)
CefLifeSpanHandlerdoClose 在接口中 CefLifeSpanHandlerbrowser - The browser generating the event.public void onBeforeClose(CefBrowser browser)
CefLifeSpanHandleronBeforeClose 在接口中 CefLifeSpanHandlerbrowser - The browser generating the event.public CefClient addLoadHandler(CefLoadHandler handler)
public void removeLoadHandler()
public void onLoadingStateChange(CefBrowser browser, boolean isLoading, boolean canGoBack, boolean canGoForward)
CefLoadHandleronLoadingStateChange 在接口中 CefLoadHandlerbrowser - The affected browser.isLoading - true if it is loading.canGoBack - true if you can navigate back.canGoForward - true if you can navigate forward.public void onLoadStart(CefBrowser browser, int frameIdentifer)
CefLoadHandleronLoadStart 在接口中 CefLoadHandlerbrowser - The affected browser.frameIdentifer - The identifier of the loading frame.public void onLoadEnd(CefBrowser browser, int frameIdentifier, int httpStatusCode)
CefLoadHandleronLoadEnd 在接口中 CefLoadHandlerbrowser - The affected browser.public void onLoadError(CefBrowser browser, int frameIdentifer, CefLoadHandler.ErrorCode errorCode, String errorText, String failedUrl)
CefLoadHandleronLoadError 在接口中 CefLoadHandlerbrowser - The affected browser.frameIdentifer - The identifier of the loading frame.errorCode - The error code number.errorText - The error text.failedUrl - The URL that failed to load.public void addMessageRouter(CefMessageRouter messageRouter)
addMessageRouter 在类中 CefClientHandlerpublic void removeMessageRouter(CefMessageRouter messageRouter)
removeMessageRouter 在类中 CefClientHandlerpublic Rectangle getViewRect(CefBrowser browser)
CefRenderHandlergetViewRect 在接口中 CefRenderHandlerbrowser - The browser generating the event.public Point getScreenPoint(CefBrowser browser, Point viewPoint)
CefRenderHandlergetScreenPoint 在接口中 CefRenderHandlerbrowser - The browser generating the event.viewPoint - The point in the view.public void onPopupShow(CefBrowser browser, boolean show)
CefRenderHandleronPopupShow 在接口中 CefRenderHandlerbrowser - The browser generating the event.show - True if the popup window is being shown.public void onPopupSize(CefBrowser browser, Rectangle size)
CefRenderHandleronPopupSize 在接口中 CefRenderHandlerbrowser - The browser generating the event.size - Size of the popup window.public void onPaint(CefBrowser browser, boolean popup, Rectangle[] dirtyRects, ByteBuffer buffer, int width, int height)
CefRenderHandleronPaint 在接口中 CefRenderHandlerbrowser - The browser generating the event.popup - True if painting a popup window.dirtyRects - Array of dirty regions.buffer - Pixel buffer for the whole window.width - Width of the buffer.height - Height of the buffer.public void onCursorChange(CefBrowser browser, int cursorType)
CefRenderHandleronCursorChange 在接口中 CefRenderHandlerbrowser - The browser generating the event.cursorType - The new cursor.public boolean startDragging(CefBrowser browser, CefDragData dragData, int mask, int x, int y)
CefRenderHandlerstartDragging 在接口中 CefRenderHandlerbrowser - The browser generating the event.dragData - Contextual information about the dragged contentmask - Describes the allowed operation (none, move, copy, link).x - Coordinate within CefBrowsery - Coordinate within CefBrowserpublic void updateDragCursor(CefBrowser browser, int operation)
CefRenderHandlerupdateDragCursor 在接口中 CefRenderHandlerbrowser - The browser generating the event.operation - Describes the allowed operation (none, move, copy, link).public CefClient addRequestHandler(CefRequestHandler handler)
public void removeRequestHandler()
public boolean onBeforeBrowse(CefBrowser browser, CefRequest request, boolean is_redirect)
CefRequestHandleronBeforeBrowse 在接口中 CefRequestHandlerbrowser - The corresponding browser.request - The request itself. Can't be modified.is_redirect - true if the request was redirected.public boolean onBeforeResourceLoad(CefBrowser browser, CefRequest request)
CefRequestHandleronBeforeResourceLoad 在接口中 CefRequestHandlerbrowser - The corresponding browser.request - The request object may be modified.public CefResourceHandler getResourceHandler(CefBrowser browser, CefRequest request)
CefRequestHandlergetResourceHandler 在接口中 CefRequestHandlerbrowser - The corresponding browser.request - The request itself. Should not be modified in this callback.public void onResourceRedirect(CefBrowser browser, CefRequest request, StringRef new_url)
CefRequestHandleronResourceRedirect 在接口中 CefRequestHandlerbrowser - The corresponding browser.request - The request itself. Should not be modified in this callback.new_url - Contains the new URL and can be changed if desired.public boolean getAuthCredentials(CefBrowser browser, boolean isProxy, String host, int port, String realm, String scheme, CefAuthCallback callback)
CefRequestHandlergetAuthCredentials 在接口中 CefRequestHandlerbrowser - The corresponding browser.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.public boolean onQuotaRequest(CefBrowser browser, String origin_url, long new_size, CefRequestCallback callback)
CefRequestHandleronQuotaRequest 在接口中 CefRequestHandlerbrowser - 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.public void onProtocolExecution(CefBrowser browser, String url, BoolRef allow_os_execution)
CefRequestHandleronProtocolExecution 在接口中 CefRequestHandlerpublic boolean onCertificateError(CefBrowser browser, CefLoadHandler.ErrorCode cert_error, String request_url, CefRequestCallback callback)
CefRequestHandleronCertificateError 在接口中 CefRequestHandlerbrowser - The corresponding browser.cert_error - Error code describing the error.request_url - The requesting URL.callback - call CefRequestCallback::Continue() to continue
or cancel the request.public void onPluginCrashed(CefBrowser browser, String pluginPath)
CefRequestHandleronPluginCrashed 在接口中 CefRequestHandlerbrowser - The corresponding browser.pluginPath - the path of the plugin that crashed.public void onRenderProcessTerminated(CefBrowser browser, CefRequestHandler.TerminationStatus status)
CefRequestHandleronRenderProcessTerminated 在接口中 CefRequestHandlerpublic Rectangle getRect(CefBrowser browser)
CefWindowHandlergetRect 在接口中 CefWindowHandlerbrowser - The browser generating the event.public void onMouseEvent(CefBrowser browser, int event, int screenX, int screenY, int modifier, int button)
CefWindowHandleronMouseEvent 在接口中 CefWindowHandlerbrowser - The browser generating the event.event - A mouse event like MouseEvent.MOUSE_MOVED.screenX - The absolute X position on the screen.screenY - The absolute Y position on the screen.modifier - The modifier keys down during event (e.g. Shift, Ctrl).button - An integer indicating which mouse button state changed.
If parameter event is set to MouseEvent.MOUSE_WHEEL, the value of this
parameter specifies the rotation indicator (negative value for left scroll
and positive value for right scroll).Copyright © 2017. All rights reserved.