1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-05-13 21:46:53 +02:00
CEF4Delphi/docs/html/uCEFPreferenceManager.TCefPreferenceManagerRef.html
2025-03-13 11:51:28 +01:00

177 lines
14 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>cef4delphi: uCEFPreferenceManager: Class TCefPreferenceManagerRef</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="TCefPreferenceManagerRef"></span><h1 class="cio">Class TCefPreferenceManagerRef</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="uCEFPreferenceManager.html">uCEFPreferenceManager</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCefPreferenceManagerRef = class(<a class="normal" href="uCEFBaseRefCounted.TCefBaseRefCountedRef.html">TCefBaseRefCountedRef</a>, <a class="normal" href="uCEFInterfaces.ICefPreferenceManager.html">ICefPreferenceManager</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Manage access to preferences. Many built-in preferences are registered by Chromium. Custom preferences can be registered in ICefBrowserProcessHandler.OnRegisterCustomPreferences. </p>
<p>
<p>&lt;see href=&quot;<a href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_preference_capi.h">https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_preference_capi.h</a>&quot;&gt;CEF source file: /include/capi/cef_preference_capi.h (cef_preference_manager_t))</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.TCefBaseRefCountedRef.html">TCefBaseRefCountedRef</a></li>
<li class="thisitem">TCefPreferenceManagerRef</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="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#HasPreference-ustring-">HasPreference</a></strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>): Boolean;</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>function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#GetPreference-ustring-">GetPreference</a></strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>): <a href="uCEFInterfaces.ICefValue.html">ICefValue</a>;</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>function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#GetAllPreferences-Boolean-">GetAllPreferences</a></strong>(includeDefaults: Boolean): <a href="uCEFInterfaces.ICefDictionaryValue.html">ICefDictionaryValue</a>;</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>function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#CanSetPreference-ustring-">CanSetPreference</a></strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>): Boolean;</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>function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#SetPreference-ustring-ICefValue-ustring-">SetPreference</a></strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>; const value: <a href="uCEFInterfaces.ICefValue.html">ICefValue</a>; out error: <a href="uCEFTypes.html#ustring">ustring</a>): Boolean;</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>function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#AddPreferenceObserver-ustring-ICefPreferenceObserver-">AddPreferenceObserver</a></strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>; const observer: <a href="uCEFInterfaces.ICefPreferenceObserver.html">ICefPreferenceObserver</a>): <a href="uCEFInterfaces.ICefRegistration.html">ICefRegistration</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>class function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#UnWrap-Pointer-">UnWrap</a></strong>(data: Pointer): <a href="uCEFInterfaces.ICefPreferenceManager.html">ICefPreferenceManager</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>class function <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#Global">Global</a></strong>: <a href="uCEFInterfaces.ICefPreferenceManager.html">ICefPreferenceManager</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>class procedure <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#GetChromeVariationsAsSwitches-TStrings-">GetChromeVariationsAsSwitches</a></strong>(const switches: TStrings);</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>class procedure <strong><a href="uCEFPreferenceManager.TCefPreferenceManagerRef.html#GetChromeVariationsAsStrings-TStrings-">GetChromeVariationsAsStrings</a></strong>(const strings: TStrings);</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="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="HasPreference-ustring-"></span><code>function <strong>HasPreference</strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>): Boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns true (1) if a preference with the specified |name| exists. This function must be called on the browser process UI thread. </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="GetPreference-ustring-"></span><code>function <strong>GetPreference</strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>): <a href="uCEFInterfaces.ICefValue.html">ICefValue</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns the value for the preference with the specified |name|. Returns NULL if the preference does not exist. The returned object contains a copy of the underlying preference value and modifications to the returned object will not modify the underlying preference value. This function must be called on the browser process UI thread. </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="GetAllPreferences-Boolean-"></span><code>function <strong>GetAllPreferences</strong>(includeDefaults: Boolean): <a href="uCEFInterfaces.ICefDictionaryValue.html">ICefDictionaryValue</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns the value for the preference with the specified |name|. Returns NULL if the preference does not exist. The returned object contains a copy of the underlying preference value and modifications to the returned object will not modify the underlying preference value. This function must be called on the browser process UI thread. </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="CanSetPreference-ustring-"></span><code>function <strong>CanSetPreference</strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>): Boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns true (1) if the preference with the specified |name| can be modified using SetPreference. As one example preferences set via the command-line usually cannot be modified. This function must be called on the browser process UI thread. </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="SetPreference-ustring-ICefValue-ustring-"></span><code>function <strong>SetPreference</strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>; const value: <a href="uCEFInterfaces.ICefValue.html">ICefValue</a>; out error: <a href="uCEFTypes.html#ustring">ustring</a>): Boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns true (1) if the preference with the specified |name| can be modified using SetPreference. As one example preferences set via the command-line usually cannot be modified. This function must be called on the browser process UI thread. </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="AddPreferenceObserver-ustring-ICefPreferenceObserver-"></span><code>function <strong>AddPreferenceObserver</strong>(const name: <a href="uCEFTypes.html#ustring">ustring</a>; const observer: <a href="uCEFInterfaces.ICefPreferenceObserver.html">ICefPreferenceObserver</a>): <a href="uCEFInterfaces.ICefRegistration.html">ICefRegistration</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Add an observer for preference changes. |name| is the name of the preference to observe. If |name| is NULL then all preferences will be observed. Observing all preferences has performance consequences and is not recommended outside of testing scenarios. The observer will remain registered until the returned Registration object is destroyed. This function must be called on the browser process UI thread. </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="UnWrap-Pointer-"></span><code>class function <strong>UnWrap</strong>(data: Pointer): <a href="uCEFInterfaces.ICefPreferenceManager.html">ICefPreferenceManager</a>;</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="Global"></span><code>class function <strong>Global</strong>: <a href="uCEFInterfaces.ICefPreferenceManager.html">ICefPreferenceManager</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns the global preference manager object. </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="GetChromeVariationsAsSwitches-TStrings-"></span><code>class procedure <strong>GetChromeVariationsAsSwitches</strong>(const switches: TStrings);</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns the current Chrome Variations configuration (combination of field trials and <a href="chrome://flags">chrome://flags</a>) as equivalent command-line switches (`&ndash;[enable|disable]-features=XXXX`, etc). These switches can be used to apply the same configuration when launching a CEF-based application. See <a href="https://developer.chrome.com/docs/web-platform/chrome-variations">https://developer.chrome.com/docs/web-platform/chrome-variations</a> for background and details. Note that field trial tests are disabled by default in Official CEF builds (via the `disable_fieldtrial_testing_config=true (1)` GN flag). This function must be called on the browser process UI thread. </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="GetChromeVariationsAsStrings-TStrings-"></span><code>class procedure <strong>GetChromeVariationsAsStrings</strong>(const strings: TStrings);</code></td>
</tr>
<tr><td colspan="2">
<p>
Returns the current Chrome Variations configuration (combination of field trials and <a href="chrome://flags">chrome://flags</a>) as human-readable strings. This is the human- readable equivalent of the &quot;Active Variations&quot; section of <a href="chrome://version">chrome://version</a>. See <a href="https://developer.chrome.com/docs/web-platform/chrome-variations">https://developer.chrome.com/docs/web-platform/chrome-variations</a> for background and details. Note that field trial tests are disabled by default in Official CEF builds (via the `disable_fieldtrial_testing_config=true (1)` GN flag). This function must be called on the browser process UI thread. </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>