Interface ICefBrowserProcessHandler

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type ICefBrowserProcessHandler = interface(ICefBaseRefCounted)

Description

Interface used to implement browser process callbacks. The functions of this interface will be called on the browser process main thread unless otherwise indicated.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_browser_process_handler_capi.h">CEF source file: /include/capi/cef_browser_process_handler_capi.h (cef_browser_process_handler_t))

Hierarchy

Overview

Methods

Public procedure OnRegisterCustomPreferences(type_: TCefPreferencesType; registrar: PCefPreferenceRegistrar);
Public procedure OnContextInitialized;
Public procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine);
Public procedure OnAlreadyRunningAppRelaunch(const commandLine: ICefCommandLine; const current_directory: ustring; var aResult: boolean);
Public procedure OnScheduleMessagePumpWork(const delayMs: Int64);
Public procedure GetDefaultClient(var aClient : ICefClient);
Public procedure GetDefaultRequestContextHandler(var aRequestContextHandler : ICefRequestContextHandler);
Public procedure RemoveReferences;

Description

Methods

Public procedure OnRegisterCustomPreferences(type_: TCefPreferencesType; registrar: PCefPreferenceRegistrar);

Provides an opportunity to register custom preferences prior to global and request context initialization.

If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be accessed via ICefPreferenceManager.GetGlobalPreferences after OnContextInitialized is called. Global preferences are registered a single time at application startup. See related TCefSettings.cache_path configuration.

If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be accessed via the ICefRequestContext after ICefRequestContextHandler.OnRequestContextInitialized is called. Request context preferences are registered each time a new ICefRequestContext is created. It is intended but not required that all request contexts have the same registered preferences. See related TCefRequestContextSettings.cache_path configuration.

Do not keep a reference to the |registrar| object. This function is called on the browser process UI thread.

Attributes
GUID['{27291B7A-C0AE-4EE0-9115-15C810E22F6C}']
Public procedure OnContextInitialized;

Called on the browser process UI thread immediately after the CEF context has been initialized.

Public procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine);

Called before a child process is launched. Will be called on the browser process UI thread when launching a render process and on the browser process IO thread when launching a GPU process. Provides an opportunity to modify the child process command line. Do not keep a reference to |command_line| outside of this function.

Public procedure OnAlreadyRunningAppRelaunch(const commandLine: ICefCommandLine; const current_directory: ustring; var aResult: boolean);

Implement this function to provide app-specific behavior when an already running app is relaunched with the same TCefSettings.root_cache_path value. For example, activate an existing app window or create a new app window. |command_line| will be read-only. Do not keep a reference to |command_line| outside of this function. Return true (1) if the relaunch is handled or false (0) for default relaunch behavior. Default behavior will create a new default styled Chrome window.

To avoid cache corruption only a single app instance is allowed to run for a given TCefSettings.root_cache_path value. On relaunch the app checks a process singleton lock and then forwards the new launch arguments to the already running app process before exiting early. Client apps should therefore check the cef_initialize() return value for early exit before proceeding.

This function will be called on the browser process UI thread.

Public procedure OnScheduleMessagePumpWork(const delayMs: Int64);

Called from any thread when work has been scheduled for the browser process main (UI) thread. This callback is used in combination with TCefSettings.external_message_pump and GlobalCEFApp.DoMessageLoopWork in cases where the CEF message loop must be integrated into an existing application message loop (see additional comments and warnings on GlobalCEFApp.DoMessageLoopWork). This callback should schedule a GlobalCEFApp.DoMessageLoopWork call to happen on the main (UI) thread. |delay_ms| is the requested delay in milliseconds. If |delay_ms| is <= 0 then the call should happen reasonably soon. If |delay_ms| is > 0 then the call should be scheduled to happen after the specified delay and any currently pending scheduled call should be cancelled.

Public procedure GetDefaultClient(var aClient : ICefClient);

Return the default client for use with a newly created browser window (TCefBrowser object). If null is returned the TCefBrowser will be unmanaged (no callbacks will be executed for that TCefBrowser) and application shutdown will be blocked until the browser window is closed manually. This function is currently only used with Chrome style when creating new browser windows via Chrome UI.

Public procedure GetDefaultRequestContextHandler(var aRequestContextHandler : ICefRequestContextHandler);

Return the default handler for use with a new user or incognito profile (TCefRequestContext object). If null is returned the TCefRequestContext will be unmanaged (no callbacks will be executed for that TCefRequestContext). This function is currently only used with Chrome style when creating new browser windows via Chrome UI.

Public procedure RemoveReferences;

Custom procedure to clear all references.


Generated by PasDoc 0.16.0-snapshot.