# Class TCefCustomBrowserProcessHandler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFBrowserProcessHandler

## Declaration

`type TCefCustomBrowserProcessHandler = class(TCefBrowserProcessHandlerOwn)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedOwn
- TCefBrowserProcessHandlerOwn
- TCefCustomBrowserProcessHandler

## Overview

### Fields

| `FCefApp: TCefApplicationCore;`

### Methods

| `procedure OnRegisterCustomPreferences(type_: TCefPreferencesType; registrar: PCefPreferenceRegistrar); override;`
| `procedure OnContextInitialized; override;`
| `procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); override;`
| `procedure OnAlreadyRunningAppRelaunch(const commandLine: ICefCommandLine; const current_directory: ustring; var aResult: boolean); override;`
| `procedure OnScheduleMessagePumpWork(const delayMs: Int64); override;`
| `procedure GetDefaultClient(var aClient : ICefClient); override;`
| `procedure GetDefaultRequestContextHandler(var aRequestContextHandler : ICefRequestContextHandler); override;`
| `procedure RemoveReferences; override;`
| `constructor Create(const aCefApp : TCefApplicationCore); reintroduce;`
| `destructor Destroy; override;`

## Description

### Fields

| `FCefApp: TCefApplicationCore;`
This item has no description.

### Methods

| `procedure OnRegisterCustomPreferences(type_: TCefPreferencesType; registrar: PCefPreferenceRegistrar); override;`

This item has no description. Showing description inherited from ICefBrowserProcessHandler.OnRegisterCustomPreferences.

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.

| `procedure OnContextInitialized; override;`
This item has no description. Showing description inherited from ICefBrowserProcessHandler.OnContextInitialized. Called on the browser process UI thread immediately after the CEF context has been initialized.

| `procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); override;`

This item has no description. Showing description inherited from ICefBrowserProcessHandler.OnBeforeChildProcessLaunch.

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.

| `procedure OnAlreadyRunningAppRelaunch(const commandLine: ICefCommandLine; const current_directory: ustring; var aResult: boolean); override;`

This item has no description. Showing description inherited from ICefBrowserProcessHandler.OnAlreadyRunningAppRelaunch.

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.

| `procedure OnScheduleMessagePumpWork(const delayMs: Int64); override;`

This item has no description. Showing description inherited from ICefBrowserProcessHandler.OnScheduleMessagePumpWork.

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.

| `procedure GetDefaultClient(var aClient : ICefClient); override;`

This item has no description. Showing description inherited from ICefBrowserProcessHandler.GetDefaultClient.

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.

| `procedure GetDefaultRequestContextHandler(var aRequestContextHandler : ICefRequestContextHandler); override;`

This item has no description. Showing description inherited from ICefBrowserProcessHandler.GetDefaultRequestContextHandler.

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.

| `procedure RemoveReferences; override;`
This item has no description. Showing description inherited from ICefBrowserProcessHandler.RemoveReferences. Custom procedure to clear all references.

| `constructor Create(const aCefApp : TCefApplicationCore); reintroduce;`
This item has no description.

| `destructor Destroy; override;`
This item has no description.

Generated by PasDoc 0.17.0.snapshot.