CEF4Delphi/docs/html/uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html
2024-02-24 12:01:31 +01:00

204 lines
18 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>cef4delphi: uCEFBrowserProcessHandler: Class TCefCustomBrowserProcessHandler</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="TCefCustomBrowserProcessHandler"></span><h1 class="cio">Class TCefCustomBrowserProcessHandler</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section"><a class="section" href="#PasDoc-Fields">Fields</a></div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uCEFBrowserProcessHandler.html">uCEFBrowserProcessHandler</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCefCustomBrowserProcessHandler = class(<a class="normal" href="uCEFBrowserProcessHandler.TCefBrowserProcessHandlerOwn.html">TCefBrowserProcessHandlerOwn</a>)</code></p>
<h2 class="description">Description</h2>
<p class="nodescription">This item has no description.</p><span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TInterfacedObject</li>
<li class="ancestor"><a class="normal" href="uCEFBaseRefCounted.TCefBaseRefCountedOwn.html">TCefBaseRefCountedOwn</a></li>
<li class="ancestor"><a class="normal" href="uCEFBrowserProcessHandler.TCefBrowserProcessHandlerOwn.html">TCefBrowserProcessHandlerOwn</a></li>
<li class="thisitem">TCefCustomBrowserProcessHandler</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Fields"></span><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#FCefApp">FCefApp</a></strong>: <a href="uCEFApplicationCore.TCefApplicationCore.html">TCefApplicationCore</a>;</code></td>
</tr>
</table>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#OnRegisterCustomPreferences-TCefPreferencesType-PCefPreferenceRegistrar-">OnRegisterCustomPreferences</a></strong>(type_: <a href="uCEFTypes.html#TCefPreferencesType">TCefPreferencesType</a>; registrar: <a href="uCEFTypes.html#PCefPreferenceRegistrar">PCefPreferenceRegistrar</a>); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#OnContextInitialized">OnContextInitialized</a></strong>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#OnBeforeChildProcessLaunch-ICefCommandLine-">OnBeforeChildProcessLaunch</a></strong>(const commandLine: <a href="uCEFInterfaces.ICefCommandLine.html">ICefCommandLine</a>); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#OnAlreadyRunningAppRelaunch-ICefCommandLine-ustring-boolean-">OnAlreadyRunningAppRelaunch</a></strong>(const commandLine: <a href="uCEFInterfaces.ICefCommandLine.html">ICefCommandLine</a>; const current_directory: <a href="uCEFTypes.html#ustring">ustring</a>; var aResult: boolean); override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#OnScheduleMessagePumpWork-Int64-">OnScheduleMessagePumpWork</a></strong>(const delayMs: Int64); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#GetDefaultClient-ICefClient-">GetDefaultClient</a></strong>(var aClient : <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>); override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#GetDefaultRequestContextHandler-ICefRequestContextHandler-">GetDefaultRequestContextHandler</a></strong>(var aRequestContextHandler : <a href="uCEFInterfaces.ICefRequestContextHandler.html">ICefRequestContextHandler</a>); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#RemoveReferences">RemoveReferences</a></strong>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#Create-TCefApplicationCore-">Create</a></strong>(const aCefApp : <a href="uCEFApplicationCore.TCefApplicationCore.html">TCefApplicationCore</a>); reintroduce;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <strong><a href="uCEFBrowserProcessHandler.TCefCustomBrowserProcessHandler.html#Destroy">Destroy</a></strong>; override;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="FCefApp"></span><code><strong>FCefApp</strong>: <a href="uCEFApplicationCore.TCefApplicationCore.html">TCefApplicationCore</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnRegisterCustomPreferences-TCefPreferencesType-PCefPreferenceRegistrar-"></span><code>procedure <strong>OnRegisterCustomPreferences</strong>(type_: <a href="uCEFTypes.html#TCefPreferencesType">TCefPreferencesType</a>; registrar: <a href="uCEFTypes.html#PCefPreferenceRegistrar">PCefPreferenceRegistrar</a>); override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#OnRegisterCustomPreferences-TCefPreferencesType-PCefPreferenceRegistrar-">ICefBrowserProcessHandler.OnRegisterCustomPreferences</a>.</p><p>
<p>Provides an opportunity to register custom preferences prior to global and request context initialization.
<p>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 and TCefSettings.persist_user_preferences configuration.
<p>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 and TCefRequestContextSettings.persist_user_preferences configuration.
<p>Do not keep a reference to the |registrar| object. This function is called on the browser process UI thread.
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnContextInitialized"></span><code>procedure <strong>OnContextInitialized</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#OnContextInitialized">ICefBrowserProcessHandler.OnContextInitialized</a>.</p><p>
Called on the browser process UI thread immediately after the CEF context has been initialized. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnBeforeChildProcessLaunch-ICefCommandLine-"></span><code>procedure <strong>OnBeforeChildProcessLaunch</strong>(const commandLine: <a href="uCEFInterfaces.ICefCommandLine.html">ICefCommandLine</a>); override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#OnBeforeChildProcessLaunch-ICefCommandLine-">ICefBrowserProcessHandler.OnBeforeChildProcessLaunch</a>.</p><p>
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. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnAlreadyRunningAppRelaunch-ICefCommandLine-ustring-boolean-"></span><code>procedure <strong>OnAlreadyRunningAppRelaunch</strong>(const commandLine: <a href="uCEFInterfaces.ICefCommandLine.html">ICefCommandLine</a>; const current_directory: <a href="uCEFTypes.html#ustring">ustring</a>; var aResult: boolean); override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#OnAlreadyRunningAppRelaunch-ICefCommandLine-ustring-boolean-">ICefBrowserProcessHandler.OnAlreadyRunningAppRelaunch</a>.</p><p>
<p>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.
<p>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.
<p>This function will be called on the browser process UI thread.
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="OnScheduleMessagePumpWork-Int64-"></span><code>procedure <strong>OnScheduleMessagePumpWork</strong>(const delayMs: Int64); override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#OnScheduleMessagePumpWork-Int64-">ICefBrowserProcessHandler.OnScheduleMessagePumpWork</a>.</p><p>
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 &lt;= 0 then the call should happen reasonably soon. If |delay_ms| is &gt; 0 then the call should be scheduled to happen after the specified delay and any currently pending scheduled call should be cancelled. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetDefaultClient-ICefClient-"></span><code>procedure <strong>GetDefaultClient</strong>(var aClient : <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>); override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#GetDefaultClient-ICefClient-">ICefBrowserProcessHandler.GetDefaultClient</a>.</p><p>
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 the Chrome runtime when creating new browser windows via Chrome UI. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetDefaultRequestContextHandler-ICefRequestContextHandler-"></span><code>procedure <strong>GetDefaultRequestContextHandler</strong>(var aRequestContextHandler : <a href="uCEFInterfaces.ICefRequestContextHandler.html">ICefRequestContextHandler</a>); override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#GetDefaultRequestContextHandler-ICefRequestContextHandler-">ICefBrowserProcessHandler.GetDefaultRequestContextHandler</a>.</p><p>
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 the Chrome runtime when creating new browser windows via Chrome UI. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="RemoveReferences"></span><code>procedure <strong>RemoveReferences</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
<p class="inheritdescription">This item has no description. Showing description inherited from <a class="normal" href="uCEFInterfaces.ICefBrowserProcessHandler.html#RemoveReferences">ICefBrowserProcessHandler.RemoveReferences</a>.</p><p>
Custom procedure to clear all references. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Create-TCefApplicationCore-"></span><code>constructor <strong>Create</strong>(const aCefApp : <a href="uCEFApplicationCore.TCefApplicationCore.html">TCefApplicationCore</a>); reintroduce;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Destroy"></span><code>destructor <strong>Destroy</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>