This is the component that puts together all browser procedures, functions, properties and events in one place. It has all you need to create, modify and destroy a web browser.
VCL and LCL applications use TChromium but FireMonkey applications use TFMXChromium. Both components inherit from TChromiumCore which has most of the code but you'll see many references to TChromium in the forum to keep it simple.
CEF uses handlers
and several classes to control the web browser and TChromiumCore hides all that complexity in one component.
Some of those handlers must always be created with each TChromiumCore instance but many will only be created if the application uses at least one event related to that handler.
It's necessary to assign procedures to the TChromiumCore events you need before creating the browser because the handler that will trigger an event will only be created if that event is us
Some properties are used when TChromiumCore creates a browser and they need to be set before the TChromiumCore.CreateBrowser call.
The default CEF configuration uses multiple threads to improve the browser performance and most of the events in this component are executed in the context of those background threads. This can cause problems with VCL, LCL and FMX controls because they are not thread safe.
If you use the default CEF configuration move all the code that creates, destroys or modifies controls outside the TChromiumCore events.
TChromiumCore will handle one browser by default but it can also be configured to handle multiple browsers when you allow CEF to create all popup windows automatically.
You have to set TChromiumCore.MultiBrowserMode to true and set Result
to false in the TChromiumCore.OnBeforePopup event in order to enable this feature.
All the events from all the browsers handled by TChromiumCore in multi-browser mode will be triggered using the same TChromiumCore instance. To differentiate what browser is responsible for each triggered event you can compare TChromiumCore.BrowserId with browser.Identifier.
There are several TChromiumCore functions and properties used to handle the array of browsers handled in multi-browser mode.
Used to create the client handler which will also create most of the browser handlers needed for the browser.
Used to create the client handler when a browser requests a new browser in a popup window or tab in the TChromiumCore.OnBeforePopup event.
Used to request the selected browser close. It calls the CefBrowserHost.CloseBrowser method. Read this for more details about this procedure.
Calls CloseBrowser for all the browsers handled by this TChromiumCore instance.
Helper for closing a browser. It calls the CefBrowserHost.TryCloseBrowser. Read this for more details about this procedure.
Select the browser with the aID
identifier when TchromiumCore uses the multi-browser mode.
Returns the index in the browsers array of the browser with the aID
identifier when TChromiumCore uses the multi-browser mode.
Creates a new request context in the aContext
parameter that shares storage with the request context of the current browser and uses an optional handler.
Used with browsers in OSR mode to initialize drag and drop in Windows.
Used with browsers in OSR mode to shutdown drag and drop in Windows.
Used to reparent the browser to a different TCEFWindowParent.
Used to create the browser after the global request context has been initialized. You need to set all properties and events before calling this function because it will only create the internal handlers needed for those events and the property values will be used in the browser initialization.
The browser will be fully initialized when the TChromiumCore.OnAfterCreated is triggered.
Used to navigate to a URL in the specified frame or the main frame.
Used to load a DATA URI with the HTML string contents in the specified frame or the main frame.
Used to load a DATA URI with the stream contents in the specified frame or the main frame. The DATA URI will be configured with the mime type and charset specified in the parameters.
Loads the request specified in the parameter.
WARNING: This function will fail with bad IPC message
reason INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request origin using some other mechanism (LoadURL, link click, etc).
Basic browser navigation function to go back, forward, reload and stop. ReloadIgnoreCache will reload the current page ignoring any cached data.
Starts downloading a file in the specified URL.
Starts downloading an image in the specified URL.
Calls CefBrowserHost.SendMouseWheelEvent to simulate a simple mouse wheel event. Use TChromiumCore.SendMouseWheelEvent if you need to specify the mouse coordinates or the event flags.
Calls CefRequestContext.ClearCertificateExceptions to clear all certificate exceptions that were added as part of handling TChromiumCore.OnCertificateError. Read this for more details about this function.
Clears all HTTP authentication credentials that were added as part of handling GetAuthCredentials. Read this for more details about this function.
Clears all active and idle connections that Chromium currently has. Read this for more details about this function.
Retrieve all the HTML content from the specified frame or the main frame. It uses a CefStringVisitor to get the HTML content asynchronously and the result will be received in the TChromiumCore.OnTextResultAvailable event.
Retrieve all the text content from the specified frame or the main frame. It uses a CefStringVisitor to get the text content asynchronously and the result will be received in the TChromiumCore.OnTextResultAvailable event.
Retrieve the current navigation entries asynchronously. The result will be available in the TChromiumCore.OnNavigationVisitorResultAvailable event. Read these documents to know more details about GetNavigationEntries and the visitor used to get the entries.
Returns the names of all existing frames.
Returns the identifiers of all existing frames.
Execute a string of JavaScript code in the specified frame or the main frame. Read this for more details about this procedure.
Used to update the browser preferences using the TChromiumCore property values asynchronously.
Save the browser preferences as a text file.
Calls CefRequestContext.ResolveHost to resolve the domain in the URL parameter to a list of IP addresses. The result will be received in the TChromiumCore.OnResolvedHostAvailable event.
Used to check if the browser parameter is the same as the selected browser in TChromiumCore.
Calling ExecuteTaskOnCefThread function will trigger the TChromiumCore.OnExecuteTaskOnCefThread event.
aCefThreadIdindicates the CEF thread on which TChromiumCore.OnExecuteTaskOnCefThread will be executed.
aTaskIDis a custom ID used to identify the task that triggered the TChromiumCore.OnExecuteTaskOnCefThread event.
aDelayMsis an optional delay in milliseconds to trigger the TChromiumCore.OnExecuteTaskOnCefThread event.
This procedure calls the Emulation.setUserAgentOverride
DevTools method to override the user agent string. Read this for more details about that method.
This procedure calls the Storage.clearDataForOrigin
DevTools method to clear the storage data for a given origin. Read this for more details about that method.
This procedure calls the Network.clearBrowserCache
DevTools method to clear the cache data.
Used to delete cookies immediately or asynchronously. If aDeleteImmediately is false TChromiumCore.DeleteCookies triggers the TChromiumCore.OnCookiesDeleted event when the cookies are deleted.
TChromiumCore.VisitAllCookies triggers the TChromiumCore.OnCookiesVisited event for each cookie aID is an optional parameter to identify which VisitAllCookies call has triggered the OnCookiesVisited event.
TChromiumCore.OnCookiesVisited may not be triggered if the cookie store is empty but the TChromium.OnCookieVisitorDestroyed event will always be triggered to signal when the browser when the visit is over.
TChromiumCore.VisitURLCookies triggers the TChromiumCore.OnCookiesVisited event for each cookie aID is an optional parameter to identify which VisitURLCookies call has triggered the OnCookiesVisited event.
TChromiumCore.OnCookiesVisited may not be triggered if the cookie store is empty but the TChromium.OnCookieVisitorDestroyed event will always be triggered to signal when the browser when the visit is over.
TChromiumCore.SetCookie triggers the TChromiumCore.OnCookieSet event when the cookie has been set aID is an optional parameter to identify which SetCookie call has triggered the OnCookieSet event.
Used to flush the cookies. If aFlushImmediately is false then OnCookiesFlushed is triggered when the cookies are flushed.
Calls CefBrowserHost.ShowDevTools to open the developer tools (DevTools) in its own browser. If inspectElementAt has a valid point with coordinates different than low(integer) then the element at the specified location will be inspected. Read this for more details about that procedure.
Calls CefBrowserHost.CloseDevTools to close the developer tools. Read this for more details about this procedure.
Calls CefBrowserHost.SendDevToolsMessage to send a function call message over the DevTools protocol. Read the code comments for send_dev_tools_message for more details.
Calls CefBrowserHost.ExecuteDevToolsMethod to execute a function call over the DevTools protocol. Read the code comments for execute_dev_tools_method for more details.
Used to add a custom DevTools message observer. Read the code comments for add_dev_tools_message_observer for more details.
Calls CefBrowserHost.Find to search for aSearchText
in the current web page. Read this for more details about that procedure.
Calls CefBrowserHost.StopFinding to stop searching for text in the current web page. Read this for more details about that procedure.
Print the current browser contents.
Print the current browser contents to a PDF file.
Execute clipboard functions like copy, paste, cut, undo, etc. in the focused frame.
Increase, decrease, reset or read the zoom value. These procedures trigger the TChromium.OnZoomPctAvailable event with the new value.
Used in OSR mode to notify the browser that the panel showing the browser contents has been resized.
Used in OSR mode to notify the browser that it has been hidden or shown.
Used in OSR mode to notify the browser that the screen info has changed.
Used in OSR mode to notify the browser that the window hosting it is about to be moved or resized.
Used in OSR mode to invalidate the view.
Used in OSR mode to issue a BeginFrame request to Chromium.
Used to send a key event to the browser. Read this for more details about that procedure.
Send a mouse click event to the browser. Read this for more details about that procedure.
Send a mouse move event to the browser. Read this for more details about that procedure.
Send a mouse wheel event to the browser. Read this for more details about that procedure.
Send a touch event to the browser for a windowless browser. Read this for more details about that procedure.
Send a focus event to the browser. Read this for more details about that procedure.
Send a capture lost event to the browser. Read this for more details about that procedure.
Send a message to the specified target process using the specified frame or the main frame. Read this for more details about that procedure.
Create a new URL request that will be treated as originating from the specified frame or the main frame and the associated browser. Read this for more details about that procedure.
Set whether the browser is focused. Read this for more details about that procedure.
Set accessibility state for all frames. Read this for more details about that procedure.
Call this method when the user drags the mouse into the web view (before calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). Read this for more details about that procedure.
Call this method each time the mouse is moved across the web view during a drag operation (after calling DragTargetDragEnter and before calling DragTargetDragLeave/DragTargetDrop). Read this for more details about that procedure.
Call this method when the user drags the mouse out of the web view (after calling DragTargetDragEnter). Read this for more details about that procedure.
Call this method when the user completes the drag operation by dropping the object onto the web view (after calling DragTargetDragEnter). Read this for more details about that procedure.
Call this method when the drag operation started by a CefRenderHandler.StartDragging call has ended either in a drop or by being cancelled. Read this for more details about that procedure.
Call this method when the drag operation started by a CefRenderHandler.StartDragging call has completed. Read this for more details about that procedure.
Begins a new composition or updates the existing composition. Read this for more details about that procedure.
Completes the existing composition by optionally inserting the specified |text| into the composition node. Read this for more details about that procedure.
Completes the existing composition by applying the current composition node contents. Read this for more details about that procedure.
Cancels the existing composition and discards the composition node contents without applying them. Read this for more details about that procedure.
If a misspelled word is currently selected in an editable node calling this method will replace it with the specified aWord. Read this for more details about that procedure.
Add the specified aWord to the spelling dictionary. Read this for more details about that procedure.
Used in Linux to resize the browser contents.
Used in Linux to update the browser visibility.
Add an observer for MediaRouter events. Read this for more details about that procedure.
Returns a MediaSource object for the specified media source URN. Read this for more details about that procedure.
Trigger an asynchronous call to CefMediaObserver.OnSinks on all registered observers. Read this for more details about that procedure.
Trigger an asynchronous call to CefMediaObserver,OnRoutes on all registered observers. Read this for more details about that procedure.
Create a new route between source and sink. Read this for more details about that procedure.
Calls CefMediaSink.GetDeviceInfo to retrieve the device info asynchronously. Read these code comments to know more details about CefMediaSink.GetDeviceInfo.
Calls CefRequestContext.LoadExtension to load a browser extension. Read this for more details about that procedure.
Returns true if this context was used to load the extension identified by extension_id. Read this for more details about that procedure.
Returns true if this context has access to the extension identified by extension_id. Read this for more details about that procedure.
Retrieve the list of all extensions that this context has access to (see HasExtension). Read this for more details about that procedure.
Returns the extension matching extension_id or nil if no matching extension is accessible in this context (see HasExtension). Read this for more details about that procedure.
DefaultUrl | First URL loaded by the browser after its creation. |
OptionsFontOptionsDefaultEncoding | Properties used to fill the TCefBrowserSettings record which is used during the browser creation. Read this or this for all the details about cef_browser_settings_t. |
PDFPrintOptions | Properties used to fill the TCefPdfPrintSettings record which is used in the TChromiumCore.PrintToPDF call. Read this for all the details about cef_pdf_print_settings_t. |
BrowserId | Calls the CefBrowser.GetIdentifier method to return the globally unique identifier for the selected browser. |
Browser | Returns a CefBrowser instance of the selected browser. |
BrowserById | Returns a CefBrowser instance of the browser with the specified id. |
BrowserCount | Returns the number of browsers in the browser array when the multi-browser mode is enabled. |
BrowserIdByIndex | Returns the identifier of the browser in the specified array position when the multi-browser mode is enabled. |
CefClient | Returns the CefClient instance used in this browser. |
ReqContextHandler | Returns the CefRequestContextHandler instance used in this browser. |
ResourceRequestHandler | Returns the CefResourceRequestHandler instance used in this browser. |
CefWindowInfo | Returns the TCefWindowInfo record used when the browser was created. Read the source code comments for cef_window_info_t corresponding to each platform : Windows, Linux and MacOS. |
VisibleNavigationEntry | Calls CefBrowserHost.GetVisibleNavigationEntry to return the current visible navigation entry for the selected browser. |
RequestContext | Returns a CefRequestContext instance used by the selected browser. |
MediaRouter | Returns a CefMediaRouter instance used by the selected browser. |
MediaObserver | Returns a CefMediaObserver instance used by the selected browser. |
MediaObserverReg | Returns the CefRegistration instance obtained when the default MediaObserver was added. |
DevToolsMsgObserver | Returns a CefDevToolsMessageObserver instance used by the selected browser. |
DevToolsMsgObserverReg | Returns the CefRegistration instance obtained when the default DevToolsMessageObserver was added. |
ExtensionHandler | Returns a CefExtensionHandler instance used by the selected browser. |
MultithreadApp | Returns the value of GlobalCEFApp.MultiThreadedMessageLoop. |
IsLoading | Calls CefBrowser.IsLoading and returns true if the browser is currently loading. |
HasDocument | Calls CefBrowser.HasDocument and returns true if a document has been loaded in the browser. |
HasView | Calls CefBrowserHost.HasView and returns true if this browser is wrapped in a CefBrowserView. |
HasDevTools | Calls CefBrowserHost.HasDevTools and returns true if this browser currently has an associated DevTools browser. |
HasClientHandler | Returns true if CefClient has a valid value. |
HasBrowser | Returns true if this component has a valid selected browser. |
CanGoBack | Calls CefBrowser.CanGoBack and returns true if the browser can navigate back. |
CanGoForward | Calls CefBrowser.CanGoForward and returns true if the browser can navigate forward. |
IsPopUp | Calls CefBrowser.IsPopUp and returns true if the window is a popup window. |
WindowHandle | Calls CefBrowserHost.GetWindowHandle and returns the window handle for this browser. |
OpenerWindowHandle | Calls CefBrowserHost.GetOpenerWindowHandle and returns the window handle of the browser that opened this browser. |
BrowserHandleWidgetHandleRenderHandle | Handles of the child controls created automatically by CEF to show the web contents. These properties are only available in Windows. |
FrameIsFocused | Returns true if CefBrowser.FocusedFrame has a valid value. |
Initialized | Returns true when the browser is fully initialized and it's not being closed. |
RequestContextCache | Returns the cache value in CefRequestContext.CachePath. |
RequestContextIsGlobal | Calls CefRequestContext.IsGlobal to check if the request context is the global context or it's independent. |
DocumentURL | Returns the URL of the main frame. |
ZoomLevelZoomPctZoomStep | Return the current zoom value. These properties are based on the CefBrowserHost.ZoomLevel value which can only be read in the CEF UI thread. |
WindowlessFrameRate | Returns the maximum rate in frames per second (fps) that OnPaint will be called for a browser in OSR mode. |
CustomHeaderNameCustomHeaderValue | Properties to add a custom HTTP header name and value to all requests. |
DoNotTrack | Set to True if you want to send the DNT header. |
SendReferrer | Set to True if you want to send the refererheader. |
HyperlinkAuditing | Enable hyperlink auditing. |
AllowOutdatedPlugins | Allow using outdated plugins. |
AlwaysAuthorizePlugins | Always authorize plugins. |
SpellChecking | Set to True if you want to enable the spell checker. |
SpellCheckerDicts | Comma delimited list of language codes used by the spell checker, for example es-ES,en-US,fr-FR,de-DE,it-IT. |
HasValidMainFrame | Returns true if the main frame exists and it's valid. |
FrameCount | Returns the number of frames that currently exist. |
DragOperations | Returns the TcefDragOperation value used during drag and drop. |
AudioMuted | Returns true if the browser's audio is muted. |
SafeSearch | Forces the Google safesearch in the browser preferences. |
YouTubeRestrict | Forces the YouTube restrictions in the browser preferences. |
PrintingEnabled | Enables printing in the browser preferences. |
AcceptLanguageList | Set the accept language list in the browser preferences. |
AcceptCookies | Sets the cookies policy value in the browser preferences. |
Block3rdPartyCookies | Blocks third party cookies in the browser preferences. |
MultiBrowserMode | Enables the multi-browser mode that allows TChromiumCore to handle several browsers with one component. These browsers are usually the main browser, popup windows and new tabs. |
DefaultWindowInfoExStyle | Default ExStyle value used to initialize the browser. A value of WS_EX_NOACTIVATE can be used as a workaround for some focus issues in CEF. |
Offline | Uses the Network.emulateNetworkConditionsDevTool method to set the browser in offline mode. |
NetworkPredictions | Sets the network prediction options in the browser preferences. |
QuicAllowed | Enables the Quic protocol in the browser preferences. |
JavascriptEnabled | Enables JavaScript in the browser preferences. |
LoadImagesAutomatically | Enables automatic image loading in the browser preferences. |
XDisplay | Gets the Xdisplay pointer in Linux. |
WebRTCIPHandlingPolicyWebRTCMultipleRoutesWebRTCNonproxiedUDP | Sets the WebRTC settings in the browser preferences. |
ProxyTypeProxySchemeProxyServerProxyPortProxyUsernameProxyPasswordProxyScriptURLProxyByPassList | Proxy configuration as described here. |
MaxConnectionsPerProxy | Sets the maximum connections per proxy value in the browser preferences. |
OnTextResultAvailable | Triggered after a TChromiumCore.RetrieveHTML or TChromiumCore.RetrieveText call with the HTML or text results. |
OnPdfPrintFinished | Triggered after a TChromiumCore.PrintToPDF call when the PDF has been created. |
OnPrefsAvailable | Triggered after a TChromiumCore.SavePreferences call when the preferences have been saved. |
OnCookiesDeleted | Triggered after a TChromiumCore.DeleteCookies call when the cookies have been deleted. |
OnResolvedHostAvailable | Triggered after a TChromiumCore.ResolveHost call with the host information. |
OnNavigationVisitorResultAvailable | Triggered after a TChromiumCore.GetNavigationEntries call with a navigation entry. |
OnDownloadImageFinished | Triggered after a TChromiumCore.DownloadImage call when the download is complete. |
OnCookiesFlushed | Triggered after a TChromiumCore.FlushCookieStore call when the cookies are flushed. |
OnCertificateExceptionsCleared | Triggered after a TChromiumCore.ClearCertificateExceptions call when the exceptions are cleared. |
OnHttpAuthCredentialsCleared | Triggered after a TChromiumCore.ClearHttpAuthCredentials call when the credentials are cleared. |
OnAllConnectionsClosed | Triggered after a TChromiumCore.CloseAllConnections call when the connections are closed. |
OnExecuteTaskOnCefThread | Triggered after a TChromiumCore.ExecuteTaskOnCefThread call in the context of the specified CEF thread. |
OnCookiesVisited | Triggered after a TChromiumCore.VisitAllCookies call with cookie information. |
OnCookieVisitorDestroyed | Triggered after a TChromiumCore.VisitAllCookies call when the IcefCookieVisitor has been destroyed. |
OnCookieSet | Triggered after a TChromiumCore.SetCookie call when the cookie has been set. |
OnZoomPctAvailable | Triggered after a call to any of the procedures to increase, decrease or reset the zoom with the new zoom value. |
OnMediaRouteCreateFinished | Triggered after a TChromiumCore.CreateRoute call when the route is created. |
OnMediaSinkDeviceInfo | Triggered after a TChromiumCore.GetDeviceInfo call with the device info. |
OnBrowserCompMsgOnWidgetCompMsgOnRenderCompMsg | Triggered for all messages sent to the child controls created by CEF to show the web contents. These events are only available in Windows. |
Read this page and the code comments in this file for all the details about ICefClient.
OnProcessMessageReceived | Called when a new message is received from a different process. |
Read this page and the code comments in this file for all the details about ICefLoadHandler.
OnLoadStart | Called after a navigation has been committed and before the browser begins loading contents in the frame. |
OnLoadEnd | Called when the browser is done loading a frame. |
OnLoadError | Called when a navigation fails or is canceled. |
OnLoadingStateChange | Called when the loading state has changed. |
Read this page and the code comments in this file for all the details about ICefFocusHandler.
OnTakeFocus | Called when the browser component is about to loose focus. |
OnSetFocus | Called when the browser component is requesting focus. |
OnGotFocus | Called when the browser component has received focus. |
Read this page and the code comments in this file for all the details about ICefContextMenuHandler.
OnBeforeContextMenu | Called before a context menu is displayed. |
OnRunContextMenu | Called to allow custom display of the context menu. |
OnContextMenuCommand | Called to execute a command selected from the context menu. |
OnContextMenuDismissed | Called when the context menu is dismissed irregardless of whether the menu was empty or a command was selected. |
Read this page and the code comments in this file for all the details about ICefKeyboardHandler.
OnPreKeyEvent | Called before a keyboard event is sent to the renderer. |
OnKeyEvent | Called after the renderer and JavaScript in the page has had a chance to handle the event. |
Read this page and the code comments in this file for all the details about ICefDisplayHandler.
OnAddressChange | Called when a frame's address has changed. |
OnTitleChange | Called when the page title changes. |
OnFavIconUrlChange | Called when the page icon changes. |
OnFullScreenModeChange | Called when web content in the page has toggled fullscreen mode. |
OnTooltip | Called when the browser is about to display a tooltip. |
OnStatusMessage | Called when the browser receives a status message. |
OnConsoleMessage | Called to display a console message. |
OnAutoResize | Called when auto-resize is enabled via CefBrowserHost.SetAutoResizeEnabled and the contents have auto-resized. |
OnLoadingProgressChange | Called when the overall page loading progress has changed. |
OnCursorChange | Called when the browser's cursor has changed. |
Read this page and the code comments in this file for all the details about ICefDownloadHandler.
OnBeforeDownload | Called before a download begins. |
OnDownloadUpdated | Called when a download's status or progress information has been updated. |
Read this page and the code comments in this file for all the details about ICefJsDialogHandler.
OnJsdialog | Called to run a JavaScript dialog. |
OnBeforeUnloadDialog | Called to run a dialog asking the user if they want to leave a page. |
OnResetDialogState | Called to cancel any pending dialogs and reset any saved dialog state. |
OnDialogClosed | Called when the default implementation dialog is closed. |
Read this page and the code comments in this file for all the details about ICefLifeSpanHandler.
OnBeforePopup | Called on the UI thread before a new popup browser is created. |
OnAfterCreated | Called after a new browser is created. |
OnBeforeClose | Called just before a browser is destroyed. |
OnClose | Called when a browser has received a request to close. This event corresponds to the CefLifeSpanHandler.DoClose method. |
Read this page and the code comments in this file for all the details about ICefRequestHandler.
OnBeforeBrowse | Called on the UI thread before browser navigation. |
OnOpenUrlFromTab | Called on the UI thread before OnBeforeBrowse in certain limited cases where navigating a new or different browser might be desirable. |
OnGetAuthCredentials | Called on the IO thread when the browser needs credentials from the user. This event corresponds to the CefRequestHandler.GetAuthCredentials method. |
OnQuotaRequest | Called on the IO thread when JavaScript requests a specific storage quota size via the webkitStorageInfo. |
OnCertificateError | Called on the UI thread to handle requests for URLs with an invalid SSL certificate. |
OnSelectClientCertificate | Called on the UI thread when a client certificate is being requested for authentication. |
OnPluginCrashed | Called on the browser process UI thread when a plugin has crashed. |
OnRenderViewReady | Called on the browser process UI thread when the render view associated with |browser| is ready to receive/handle IPC messages in the render process. |
OnRenderProcessTerminated | Called on the browser process UI thread when the render process terminates unexpectedly. |
OnGetResourceRequestHandler_ReqHdlr | Called on the browser process IO thread before a resource request is initiated. This event corresponds to the CefRequestHandler.GetResourceRequestHandler method. |
OnDocumentAvailableInMainFrame | Called on the browser process UI thread when the window.document object of the main frame has been created. |
Read this page and the code comments in this file for all the details about ICefResourceRequestHandler.
OnBeforeResourceLoad | Called on the IO thread before a resource request is loaded. |
OnGetResourceHandler | Called on the IO thread before a resource is loaded. This event corresponds to the CefResourceRequestHandler.GetResourceHandler method. |
OnResourceRedirect | Called on the IO thread when a resource load is redirected. |
OnResourceResponse | Called on the IO thread when a resource response is received. |
OnGetResourceResponseFilter | Called on the IO thread to optionally filter resource response content. This event corresponds to the CefResourceRequestHandler.GetResourceResponseFilter method. |
OnResourceLoadComplete | Called on the IO thread when a resource load has completed. |
OnProtocolExecution | Called on the IO thread to handle requests for URLs with an unknown protocol component. |
Read this page and the code comments in this file for all the details about ICefCookieAccessFilter.
OnCanSendCookie | Called on the IO thread before a resource request is sent. This event corresponds to the CefCookieAccessFilter.CanSendCookie method. |
OnCanSaveCookie | Called on the IO thread after a resource response is received. This event corresponds to the CefCookieAccessFilter.CanSaveCookie method. |
Read this page and the code comments in this file for all the details about ICefDialogHandler.
OnFileDialog | Called to run a file chooser dialog. |
Read this page and the code comments in this file for all the details about ICefRenderHandler.
OnGetAccessibilityHandler | Return the handler for accessibility notifications. This event corresponds to the CefRenderHandler.GetAccessibilityHandler method. |
OnGetRootScreenRect | Called to retrieve the root window rectangle in screen coordinates. This event corresponds to the CefRenderHandler.GetRootScreenRect method. |
OnGetViewRect | Called to retrieve the view rectangle which is relative to screen coordinates. This event corresponds to the CefRenderHandler.GetViewRect method. |
OnGetScreenPoint | Called to retrieve the translation from view coordinates to actual screen coordinates. This event corresponds to the CefRenderHandler.GetScreenPoint method. |
OnGetScreenInfo | Called to allow the client to fill in the CefScreenInfo object with appropriate values. This event corresponds to the CefRenderHandler.GetScreenInfo method. |
OnPopupShow | Called when the browser wants to show or hide the popup widget. |
OnPopupSize | Called when the browser wants to move or resize the popup widget. |
OnPaint | Called when an element should be painted. |
OnAcceleratedPaint | Called when an element has been rendered to the shared texture handle. |
OnStartDragging | Called when the user starts dragging content in the web view. This event corresponds to the CefRenderHandler.StartDragging method. |
OnUpdateDragCursor | Called when the web view wants to update the mouse cursor during a drag & drop operation. This event corresponds to the CefRenderHandler.UpdateDragCursor method. |
OnScrollOffsetChanged | Called when the scroll offset has changed. |
OnIMECompositionRangeChanged | Called when the IME composition range has changed. |
OnTextSelectionChanged | Called when text selection has changed for the specified browser. |
OnVirtualKeyboardRequested | Called when an on-screen keyboard should be shown or hidden for the specified browser. |
Read this page and the code comments in this file for all the details about ICefDragHandler.
OnDragEnter | Called when an external drag event enters the browser window. |
OnDraggableRegionsChanged | Called whenever draggable regions for the browser window change. |
Read this page and the code comments in this file for all the details about ICefFindHandler.
OnFindResult | Called to report find results returned by TchromiumCore.Find. |
Read this page and the code comments in this file for all the details about ICefRequestContextHandler.
OnRequestContextInitialized | Called on the browser process UI thread immediately after the request context has been initialized. |
OnBeforePluginLoad | Called on multiple browser process threads before a plugin instance is loaded. |
OnGetResourceRequestHandler_ReqCtxHdlr | Called on the browser process IO thread before a resource request is initiated. This event corresponds to the CefRequestContextHandler.GetResourceRequestHandler method. |
Read this page and the code comments in this file for all the details about ICefMediaObserver.
OnSinks | The list of available media sinks has changed or TchromiumCore.NotifyCurrentSinks was called. |
OnRoutes | The list of available media routes has changed or TChromiumCore.NotifyCurrentRoutes was called. |
OnRouteStateChanged | The connection state of route has changed. |
OnRouteMessageReceived | A message was received over route. |
Read the code comments in this file for all the details about ICefAudioHandler.
OnGetAudioParameters | Called on the UI thread to allow configuration of audio stream parameters. This event corresponds to the CefAudioHandler.GetAudioParameters method. |
OnAudioStreamStarted | Called on a browser audio capture thread when the browser starts streaming audio. |
OnAudioStreamPacket | Called on the audio stream thread when a PCM packet is received for the stream. |
OnAudioStreamStopped | Called on the UI thread when the stream has stopped. |
OnAudioStreamError | Called on the UI or audio stream thread when an error occurred. |
Read the code comments in this file for all the details about ICefDevToolsMessageObserver.
OnDevToolsMessage | Called on receipt of a DevTools protocol message with the parsed JSON text in the parameters. |
OnDevToolsRawMessage | Called on receipt of a DevTools protocol message with the unparsed text in the parameters. If an application uses this event then the OnDevToolsMessage event won't be triggered. |
OnDevToolsMethodResult | Called after attempted execution of a DevTools protocol function with the parsed JSON text in the parameters. |
OnDevToolsMethodRawResult | Called after attempted execution of a DevTools protocol function with the unparsed text in the parameters. If an application uses this event then the OnDevToolsMethodResult event won't be triggered. |
OnDevToolsEvent | Called on receipt of a DevTools protocol event with the parsed JSON text in the parameters. |
OnDevToolsRawEvent | Called on receipt of a DevTools protocol event with the unparsed text in the parameters. If an application uses this event then the OnDevToolsEvent event won't be triggered. |
OnDevToolsAgentAttached | Called when the DevTools agent has attached. |
OnDevToolsAgentDetached | Called when the DevTools agent has detached. |
Read this page and the code comments in this file for all the details about ICefExtensionHandler.
OnExtensionLoadFailed | Called if the TChromiumCore.LoadExtension request fails. |
OnExtensionLoaded | Called if the TChromiumCore.LoadExtension request succeeds. |
OnExtensionUnloaded | Called after the CefExtension.Unload request has completed. |
OnExtensionBeforeBackgroundBrowser | Called when an extension needs a browser to host a background script specified via the backgroundmanifest key. This event corresponds to the CefExtensionHandler.OnBeforeBackgroundBrowser method. |
OnExtensionBeforeBrowser | Called when an extension API (e.g. chrome.tabs.create) requests creation of a new browser. This event corresponds to the CefExtensionHandler.OnBeforeBrowser method. |
OnExtensionGetActiveBrowser | Called when no tabId is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). This event corresponds to the CefExtensionHandler.GetActiveBrowser method. |
OnExtensionCanAccessBrowser | Called when the tabId associated with target_browser is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). This event corresponds to the CefExtensionHandler.CanAccessBrowser method. |
OnExtensionGetExtensionResource | Called to retrieve an extension resource that would normally be loaded from disk (e.g. if a file parameter is specified to chrome.tabs.executeScript). This event corresponds to the CefExtensionHandler.GetExtensionResource method. |
Read this page and the code comments in this file for all the details about ICefPrintHandler.
All these events are only available on Linux.
OnPrintStart | Called when printing has started for the specified browser. |
OnPrintSettings | Synchronize settings with client state. |
OnPrintDialog | Show the print dialog. |
OnPrintJob | Send the print job to the printer. |
OnPrintReset | Reset client state related to printing. |
OnGetPDFPaperSize | Return the PDF paper size in device units. This event corresponds to the CefPrintHandler.GetPDFPaperSize method. |