CefClient
open class CefClient : CefClientHandler, CefContextMenuHandler, CefDialogHandler, CefDisplayHandler, CefDownloadHandler, CefDragHandler, CefFocusHandler, CefPermissionHandler, CefJSDialogHandler, CefKeyboardHandler, CefLifeSpanHandler, CefLoadHandler, CefPrintHandler, CefRenderHandler, CefRequestHandler, CefWindowHandler
Client that owns a browser and renderer.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Add provided listener.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun createBrowser(url: String, isOffscreenRendered: Boolean, isTransparent: Boolean): CefBrowser
open fun createBrowser(url: String, isOffscreenRendered: Boolean, isTransparent: Boolean, context: CefRequestContext): CefBrowser
open fun createBrowser(url: String, rendering: CefRendering, isTransparent: Boolean, context: CefRequestContext): CefBrowser
open fun createBrowser(url: String, isOffscreenRendered: Boolean, isTransparent: Boolean, context: CefRequestContext, settings: CefBrowserSettings): CefBrowser
open fun createBrowser(url: String, rendering: CefRendering, isTransparent: Boolean, context: CefRequestContext, settings: CefBrowserSettings): CefBrowser
Link copied to clipboard
Called when a browser has received a request to close.
Link copied to clipboard
open fun getAuthCredentials(browser: CefBrowser, origin_url: String, isProxy: Boolean, host: String, port: Int, realm: String, scheme: String, callback: CefAuthCallback): Boolean
Called on the IO thread when the browser needs credentials from the user.
Link copied to clipboard
Retrieve the scale factor of the screen the browser is shown at.
Link copied to clipboard
Method is called by the native code to get the reference to an previous stored identifier.
Link copied to clipboard
Called to retrieve the page size when printToPDF is requested for a browser.
Link copied to clipboard
Retrieve the view rectangle.
Link copied to clipboard
open fun getResourceRequestHandler(browser: CefBrowser, frame: CefFrame, request: CefRequest, isNavigation: Boolean, isDownload: Boolean, requestInitiator: String, disableDefaultHandling: BoolRef): CefResourceRequestHandler
Called on the IO thread before a resource request is initiated.
Link copied to clipboard
Retrieve the screen info.
Link copied to clipboard
Retrieve the screen point for the specified view point.
Link copied to clipboard
Retrieve the view rectangle.
Link copied to clipboard
Link copied to clipboard
Browser address changed.
Link copied to clipboard
Handle creation of a new browser window.
Link copied to clipboard
Called after a browser's native parent window has changed.
Link copied to clipboard
open fun onBeforeBrowse(browser: CefBrowser, frame: CefFrame, request: CefRequest, user_gesture: Boolean, is_redirect: Boolean): Boolean
Called on the UI thread before browser navigation.
Link copied to clipboard
Called just before a browser is destroyed.
Link copied to clipboard
open fun onBeforeContextMenu(browser: CefBrowser, frame: CefFrame, params: CefContextMenuParams, model: CefMenuModel)
Called before a context menu is displayed.
Link copied to clipboard
open fun onBeforeDownload(browser: CefBrowser, downloadItem: CefDownloadItem, suggestedName: String, callback: CefBeforeDownloadCallback)
Called before a download begins.
Link copied to clipboard
open fun onBeforePopup(browser: CefBrowser, frame: CefFrame, target_url: String, target_frame_name: String): Boolean
Called on the IO thread before a new popup window is created.
Link copied to clipboard
open fun onBeforeUnloadDialog(browser: CefBrowser, message_text: String, is_reload: Boolean, callback: CefJSDialogCallback): Boolean
Called to run a dialog asking the user if they want to leave a page.
Link copied to clipboard
open fun onCertificateError(browser: CefBrowser, cert_error: CefLoadHandler.ErrorCode, request_url: String, sslInfo: CefSSLInfo, callback: CefCallback): Boolean
Called on the UI thread to handle requests for URLs with an invalid SSL certificate.
Link copied to clipboard
open fun onConsoleMessage(browser: CefBrowser, level: CefSettings.LogSeverity, message: String, source: String, line: Int): Boolean
Display a console message.
Link copied to clipboard
open fun onContextMenuCommand(browser: CefBrowser, frame: CefFrame, params: CefContextMenuParams, commandId: Int, eventFlags: Int): Boolean
Called to execute a command selected from the context menu.
Link copied to clipboard
Called when the context menu is dismissed irregardless of whether the menu was empty or a command was selected.
Link copied to clipboard
Handle cursor changes.
Link copied to clipboard
Called when the default implementation dialog is closed.
Link copied to clipboard
open fun onDownloadUpdated(browser: CefBrowser, downloadItem: CefDownloadItem, callback: CefDownloadItemCallback)
Called when a download's status or progress information has been updated.
Link copied to clipboard
Called when an external drag event enters the browser window.
Link copied to clipboard
open fun onFileDialog(browser: CefBrowser, mode: CefDialogHandler.FileDialogMode, title: String, defaultFilePath: String, acceptFilters: Vector<String>, callback: CefFileDialogCallback): Boolean
Called to run a file chooser dialog.
Link copied to clipboard
Browser fullscreen mode changed.
Link copied to clipboard
Called when the browser component has received focus.
Link copied to clipboard
open fun OnImeCompositionRangeChanged(browser: CefBrowser, selectionRange: CefRange, characterBounds: Array<Rectangle>)
Called when the IME composition range has changed.
Link copied to clipboard
open fun onJSDialog(browser: CefBrowser, origin_url: String, dialog_type: CefJSDialogHandler.JSDialogType, message_text: String, default_prompt_text: String, callback: CefJSDialogCallback, suppress_message: BoolRef): Boolean
Called to run a JavaScript dialog.
Link copied to clipboard
Called after the renderer and JavaScript in the page has had a chance to handle the event.
Link copied to clipboard
Called when the browser is done loading a frame.
Link copied to clipboard
open fun onLoadError(browser: CefBrowser, frame: CefFrame, errorCode: CefLoadHandler.ErrorCode, errorText: String, failedUrl: String)
Called when the resource load for a navigation fails or is canceled.
Link copied to clipboard
open fun onLoadingStateChange(browser: CefBrowser, isLoading: Boolean, canGoBack: Boolean, canGoForward: Boolean)
Called when the loading state has changed.
Link copied to clipboard
open fun onLoadStart(browser: CefBrowser, frame: CefFrame, transitionType: CefRequest.TransitionType)
Called when the browser begins loading a frame.
Link copied to clipboard
open fun onMouseEvent(browser: CefBrowser, event: Int, screenX: Int, screenY: Int, modifier: Int, button: Int)
Implement this method to handle mouse events on Windows.
Link copied to clipboard
open fun onOpenURLFromTab(browser: CefBrowser, frame: CefFrame, target_url: String, user_gesture: Boolean): Boolean
Called on the UI thread before OnBeforeBrowse in certain limited cases where navigating a new or different browser might be desirable.
Link copied to clipboard
open fun onPaint(browser: CefBrowser, popup: Boolean, dirtyRects: Array<Rectangle>, buffer: ByteBuffer, width: Int, height: Int)
Handle painting.
Link copied to clipboard
Show or hide the popup window.
Link copied to clipboard
Size the popup window.
Link copied to clipboard
open fun onPreKeyEvent(browser: CefBrowser, event: CefKeyboardHandler.CefKeyEvent, is_keyboard_shortcut: BoolRef): Boolean
Called before a keyboard event is sent to the renderer.
Link copied to clipboard
open fun onPrintDialog(browser: CefBrowser, hasSelection: Boolean, callback: CefPrintDialogCallback): Boolean
Called to show the print dialog.
Link copied to clipboard
open fun onPrintJob(browser: CefBrowser, documentName: String, pdfFilePath: String, callback: CefPrintJobCallback): Boolean
Called to send the print job to the printer.
Link copied to clipboard
Called to reset client state related to printing.
Link copied to clipboard
Called to get print settings.
Link copied to clipboard
Called when printing has started.
Link copied to clipboard
open fun onRenderProcessTerminated(browser: CefBrowser, status: CefRequestHandler.TerminationStatus)
Called on the browser process UI thread when the render process terminates unexpectedly.
Link copied to clipboard
open fun onRequestMediaAccessPermission(browser: CefBrowser, frame: CefFrame, requesting_url: String, requested_permissions: Int, callback: CefMediaAccessCallback): Boolean
Called when a page requests permission to access media.
Link copied to clipboard
Called to cancel any pending dialogs and reset any saved dialog state.
Link copied to clipboard
Called when the browser component is requesting focus.
Link copied to clipboard
Received a status message.
Link copied to clipboard
Called when the browser component is about to loose focus.
Link copied to clipboard
open fun OnTextSelectionChanged(browser: CefBrowser, selectedText: String, selectionRange: CefRange)
Called when text selection has changed
Link copied to clipboard
Browser title changed.
Link copied to clipboard
About to display a tooltip.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Remove provided listener.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Method is called by the native code to store a reference to an implemented native JNI counterpart.
Link copied to clipboard
Link copied to clipboard
Remove existing listeners and replace with provided listener.
Link copied to clipboard
open fun startDragging(browser: CefBrowser, dragData: CefDragData, mask: Int, x: Int, y: Int): Boolean
Called when the user starts dragging content in the web view.
Link copied to clipboard
Implement this method to get state changes of the CefApp.
Link copied to clipboard
Called when the web view wants to update the mouse cursor during a drag &drop operation.