CEF4Delphi/docs/html/uCEFInterfaces.ICefExtensionHandler.html
2024-02-24 12:01:31 +01:00

172 lines
16 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>cef4delphi: uCEFInterfaces: Interface ICefExtensionHandler</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="ICefExtensionHandler"></span><h1 class="cio">Interface ICefExtensionHandler</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">Fields</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="uCEFInterfaces.html">uCEFInterfaces</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICefExtensionHandler = interface(<a class="normal" href="uCEFInterfaces.ICefBaseRefCounted.html">ICefBaseRefCounted</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Implement this interface to handle events related to browser extensions. The functions of this interface will be called on the UI thread. See ICefRequestContext.LoadExtension for information about extension loading. </p>
<p>
<p>UNKNOWN
<p>&lt;see href=&quot;<a href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_extension_handler_capi.h">https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_extension_handler_capi.h</a>&quot;&gt;CEF source file: /include/capi/cef_extension_handler_capi.h (cef_extension_handler_t))</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IInterface</li>
<li class="ancestor"><a class="normal" href="uCEFInterfaces.ICefBaseRefCounted.html">ICefBaseRefCounted</a></li>
<li class="thisitem">ICefExtensionHandler</li></ul><h2 class="overview">Overview</h2>
<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="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#OnExtensionLoadFailed-TCefErrorcode-">OnExtensionLoadFailed</a></strong>(result: <a href="uCEFTypes.html#TCefErrorCode">TCefErrorcode</a>);</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>procedure <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#OnExtensionLoaded-ICefExtension-">OnExtensionLoaded</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</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>procedure <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#OnExtensionUnloaded-ICefExtension-">OnExtensionUnloaded</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</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>function <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#OnBeforeBackgroundBrowser-ICefExtension-ustring-ICefClient-TCefBrowserSettings-">OnBeforeBackgroundBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const url: <a href="uCEFTypes.html#ustring">ustring</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</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>function <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#OnBeforeBrowser-ICefExtension-ICefBrowser-ICefBrowser-Integer-ustring-boolean-TCefWindowInfo-ICefClient-TCefBrowserSettings-">OnBeforeBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser, active_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; index: Integer; const url: <a href="uCEFTypes.html#ustring">ustring</a>; active: boolean; var windowInfo: <a href="uCEFTypes.TCefWindowInfo.html">TCefWindowInfo</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</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>procedure <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#GetActiveBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-">GetActiveBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; var aRsltBrowser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>);</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>function <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#CanAccessBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-">CanAccessBrowser</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; const target_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>): boolean;</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>function <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#GetExtensionResource-ICefExtension-ICefBrowser-ustring-ICefGetExtensionResourceCallback-">GetExtensionResource</a></strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; const file_: <a href="uCEFTypes.html#ustring">ustring</a>; const callback: <a href="uCEFInterfaces.ICefGetExtensionResourceCallback.html">ICefGetExtensionResourceCallback</a>): boolean;</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>procedure <strong><a href="uCEFInterfaces.ICefExtensionHandler.html#RemoveReferences">RemoveReferences</a></strong>;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<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="OnExtensionLoadFailed-TCefErrorcode-"></span><code>procedure <strong>OnExtensionLoadFailed</strong>(result: <a href="uCEFTypes.html#TCefErrorCode">TCefErrorcode</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Called if the ICefRequestContext.LoadExtension request fails. |result| will be the error code. </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
<dt>GUID['{3234008F-D809-459D-963D-23BA50219648}']</dt>
<dd></dd>
</dl>
</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="OnExtensionLoaded-ICefExtension-"></span><code>procedure <strong>OnExtensionLoaded</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Called if the ICefRequestContext.LoadExtension request succeeds. |extension| is the loaded extension. </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="OnExtensionUnloaded-ICefExtension-"></span><code>procedure <strong>OnExtensionUnloaded</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Called after the ICefExtension.Unload request has completed. </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="OnBeforeBackgroundBrowser-ICefExtension-ustring-ICefClient-TCefBrowserSettings-"></span><code>function <strong>OnBeforeBackgroundBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const url: <a href="uCEFTypes.html#ustring">ustring</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when an extension needs a browser to host a background script specified via the &quot;background&quot; manifest key. The browser will have no visible window and cannot be displayed. |extension| is the extension that is loading the background script. |url| is an internally generated reference to an HTML page that will be used to load the background script via a &quot;&lt;script&gt;&quot; src attribute. To allow creation of the browser optionally modify |client| and |settings| and return false (0). To cancel creation of the browser (and consequently cancel load of the background script) return true (1). Successful creation will be indicated by a call to ICefLifeSpanHandler.OnAfterCreated, and ICefBrowserHost.IsBackgroundHost will return true (1) for the resulting browser. See <a href="https://developer.chrome.com/extensions/event_pages">https://developer.chrome.com/extensions/event_pages</a> for more information about extension background script usage. </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="OnBeforeBrowser-ICefExtension-ICefBrowser-ICefBrowser-Integer-ustring-boolean-TCefWindowInfo-ICefClient-TCefBrowserSettings-"></span><code>function <strong>OnBeforeBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser, active_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; index: Integer; const url: <a href="uCEFTypes.html#ustring">ustring</a>; active: boolean; var windowInfo: <a href="uCEFTypes.TCefWindowInfo.html">TCefWindowInfo</a>; var client: <a href="uCEFInterfaces.ICefClient.html">ICefClient</a>; var settings: <a href="uCEFTypes.TCefBrowserSettings.html">TCefBrowserSettings</a>) : boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when an extension API (e.g. chrome.tabs.create) requests creation of a new browser. |extension| and |browser| are the source of the API call. |active_browser| may optionally be specified via the windowId property or returned via the get_active_browser() callback and provides the default |client| and |settings| values for the new browser. |index| is the position value optionally specified via the index property. |url| is the URL that will be loaded in the browser. |active| is true (1) if the new browser should be active when opened. To allow creation of the browser optionally modify |windowInfo|, |client| and |settings| and return false (0). To cancel creation of the browser return true (1). Successful creation will be indicated by a call to ICefLifeSpanHandler.OnAfterCreated. Any modifications to |windowInfo| will be ignored if |active_browser| is wrapped in a ICefBrowserView. </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="GetActiveBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-"></span><code>procedure <strong>GetActiveBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; var aRsltBrowser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>);</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when no tabId is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the source of the API call. Return the browser that will be acted on by the API call or return NULL to act on |browser|. The returned browser must share the same ICefRequestContext as |browser|. Incognito browsers should not be considered unless the source extension has incognito access enabled, in which case |include_incognito| will be true (1). </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="CanAccessBrowser-ICefExtension-ICefBrowser-boolean-ICefBrowser-"></span><code>function <strong>CanAccessBrowser</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; include_incognito: boolean; const target_browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>): boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when the tabId associated with |target_browser| is specified to an extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the source of the API call. Return true (1) to allow access of false (0) to deny access. Access to incognito browsers should not be allowed unless the source extension has incognito access enabled, in which case |include_incognito| will be true (1). </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="GetExtensionResource-ICefExtension-ICefBrowser-ustring-ICefGetExtensionResourceCallback-"></span><code>function <strong>GetExtensionResource</strong>(const extension: <a href="uCEFInterfaces.ICefExtension.html">ICefExtension</a>; const browser: <a href="uCEFInterfaces.ICefBrowser.html">ICefBrowser</a>; const file_: <a href="uCEFTypes.html#ustring">ustring</a>; const callback: <a href="uCEFInterfaces.ICefGetExtensionResourceCallback.html">ICefGetExtensionResourceCallback</a>): boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
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). |extension| and |browser| are the source of the resource request. |file| is the requested relative file path. To handle the resource request return true (1) and execute |callback| either synchronously or asynchronously. For the default behavior which reads the resource from the extension directory on disk return false (0). Localization substitutions will not be applied to resources handled via this function. </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="RemoveReferences"></span><code>procedure <strong>RemoveReferences</strong>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Custom procedure to clear all references. </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>