CefBrowserOsrWithHandler

Cef offscreen browser that forwards all events to CefRenderHandler

Since

api-1.3

Constructors

Link copied to clipboard
constructor(client: CefClient, url: String, context: CefRequestContext, renderHandler: CefRenderHandler)
constructor(client: CefClient, url: String, context: CefRequestContext, renderHandler: CefRenderHandler, component: Component)
In order for the browser to start loading call createImmediately.
constructor(client: CefClient, url: String, context: CefRequestContext, renderHandler: CefRenderHandler, component: Component, settings: CefBrowserSettings)
constructor(client: CefClient, url: String, context: CefRequestContext, renderHandler: CefRenderHandler, component: Component, parent: CefBrowser, inspectAt: Point)
Creates a DevTools browser for the provided parent.
constructor(client: CefClient, url: String, context: CefRequestContext, renderHandler: CefRenderHandler, component: Component, parent: CefBrowser, inspectAt: Point, settings: CefBrowserSettings)

Functions

Link copied to clipboard
open fun canGoBack(): Boolean
Tests if the browser can navigate backwards.
Link copied to clipboard
open fun canGoForward(): Boolean
Tests if the browser can navigate forwards.
Link copied to clipboard
open fun close(force: Boolean)
Request that the browser close.
Link copied to clipboard
Call to immediately create the underlying browser object.
Link copied to clipboard
Captures a screenshot-like image of the currently displayed content and returns it.
Link copied to clipboard
open fun doClose(): Boolean
Called from CefClient.doClose.
Link copied to clipboard
open fun executeJavaScript(code: String, url: String, line: Int)
Execute a string of JavaScript code in this frame.
Link copied to clipboard
open fun find(searchText: String, forward: Boolean, matchCase: Boolean, findNext: Boolean)
Search for some kind of text on the page.
Link copied to clipboard
open fun getClient(): CefClient
Get the client associated with this browser.
Link copied to clipboard
open fun getDevTools(inspectAt: Point): CefBrowser
Get an instance of the DevTools to be displayed in its own window or to be embedded within your UI.
Link copied to clipboard
Get an instance of a client that can be used to leverage the DevTools protocol.
Link copied to clipboard
Returns the focused frame for the browser window.
Link copied to clipboard
open fun getFrameByIdentifier(identifier: String): CefFrame
Returns the frame with the specified identifier, or NULL if not found.
Link copied to clipboard
open fun getFrameByName(name: String): CefFrame
Returns the frame with the specified name, or NULL if not found.
Link copied to clipboard
open fun getFrameCount(): Int
Returns the number of frames that currently exist.
Link copied to clipboard
Returns the identifiers of all existing frames.
Link copied to clipboard
Returns the names of all existing frames.
Link copied to clipboard
open fun getIdentifier(): Int
Returns the unique browser identifier.
Link copied to clipboard
Returns the main (top-level) frame for the browser window.
Link copied to clipboard
open fun getNativeRef(): Long

open fun getNativeRef(identifer: String): Long
Method is called by the native code to get the reference to an previous stored identifier.
Link copied to clipboard
Get an implementation of CefRenderHandler if any.
Link copied to clipboard
Returns the request context for this browser.
Link copied to clipboard
open fun getSource(visitor: CefStringVisitor)
Retrieve this frame's HTML source as a string sent to the specified visitor.
Link copied to clipboard
open fun getText(visitor: CefStringVisitor)
Retrieve this frame's display text as a string sent to the specified visitor.
Link copied to clipboard
Get the underlying UI component (e.g.
Link copied to clipboard
open fun getURL(): String
Emits the URL currently loaded in this frame.
Link copied to clipboard
Get an implementation of CefWindowHandler if any.
Link copied to clipboard
Returns the maximum rate in frames per second (fps) that CefRenderHandler::onPaint will be called for a windowless browser.
Link copied to clipboard
open fun getZoomLevel(): Double
Get the current zoom level.
Link copied to clipboard
open fun goBack()
Go back.
Link copied to clipboard
open fun goForward()
Go forward.
Link copied to clipboard
open fun hasDocument(): Boolean
Tests if a document has been loaded in the browser.
Link copied to clipboard
Cancels the existing composition and discards the composition node contents without applying them.
Link copied to clipboard
fun ImeCommitText(text: String, replacementRange: CefRange, relativeCursorPos: Int)
Completes the existing composition by optionally inserting the specified |text| into the composition node.
Link copied to clipboard
fun ImeFinishComposingText(keepSelection: Boolean)
Completes the existing composition by applying the current composition node contents.
Link copied to clipboard
abstract fun ImeSetComposition(text: String, underlines: List<CefCompositionUnderline>, replacementRange: CefRange, selectionRange: CefRange)
fun ImeSetComposition(text: String, underlines: List<CefCompositionUnderline>, replacementRange: CefRange, selectionRange: CefRange)
Begins a new composition or updates the existing composition.
Link copied to clipboard
open fun isClosed(): Boolean
Link copied to clipboard
open fun isClosing(): Boolean
Link copied to clipboard
open fun isLoading(): Boolean
Tests if the browser is currently loading.
Link copied to clipboard
open fun isPopup(): Boolean
Tests if the window is a popup window.
Link copied to clipboard
open fun loadRequest(request: CefRequest)
Load the request represented by the request object.
Link copied to clipboard
open fun loadURL(url: String)
Load the specified URL in the main frame.
Link copied to clipboard
Send a notification to the browser that the screen info has changed.
Link copied to clipboard
open fun onBeforeClose()
Called from CefClient.onBeforeClose.
Link copied to clipboard
open fun print()
Print the current browser contents.
Link copied to clipboard
abstract fun printToPDF(path: String, settings: CefPdfPrintSettings, callback: CefPdfPrintCallback)
open fun printToPDF(path: String, settings: CefPdfPrintSettings, callback: CefPdfPrintCallback)
Print the current browser contents to a PDF.
Link copied to clipboard
open fun reload()
Reload the current page.
Link copied to clipboard
Reload the current page ignoring any cached data.
Link copied to clipboard
open fun replaceMisspelling(word: String)
If a misspelled word is currently selected in an editable node calling this method will replace it with the specified |word|.
Link copied to clipboard
abstract fun runFileDialog(mode: CefDialogHandler.FileDialogMode, title: String, defaultFilePath: String, acceptFilters: Vector<String>, callback: CefRunFileDialogCallback)
open fun runFileDialog(mode: CefDialogHandler.FileDialogMode, title: String, defaultFilePath: String, acceptFilters: Vector<String>, callback: CefRunFileDialogCallback)
Call to run a file chooser dialog.
Link copied to clipboard
Send a key event.
Link copied to clipboard
Send a mouse event.
Link copied to clipboard
Send a mouse wheel event.
Link copied to clipboard
Link copied to clipboard
open fun setCloseAllowed()
Allow the browser to close.
Link copied to clipboard
open fun setFocus(enable: Boolean)
Set or remove keyboard focus to/from the browser window.
Link copied to clipboard
open fun setNativeRef(identifer: String, nativeRef: Long)
Method is called by the native code to store a reference to an implemented native JNI counterpart.
Link copied to clipboard
open fun setWindowlessFrameRate(frameRate: Int)
Set the maximum rate in frames per second (fps) that CefRenderHandler::onPaint will be called for a windowless browser.
Link copied to clipboard
open fun setWindowVisibility(visible: Boolean)
Set whether the window containing the browser is visible (minimized/unminimized, app hidden/unhidden, etc).
Link copied to clipboard
open fun setZoomLevel(zoomLevel: Double)
Change the zoom level to the specified value.
Link copied to clipboard
open fun startDownload(url: String)
Download the file at url using CefDownloadHandler.
Link copied to clipboard
Implement this method to get state changes of the CefApp.
Link copied to clipboard
open fun stopFinding(clearSelection: Boolean)
Cancel all searches that are currently going on.
Link copied to clipboard
open fun stopLoad()
Stop loading the page.
Link copied to clipboard
open fun viewSource()
Save this frame's HTML source to a temporary file and open it in the default text viewing application.
Link copied to clipboard
fun wasResized(width: Int, height: Int)
Notify that the browser was resized.