|
Chromium Embedded Framework (CEF) 156.0.1+g8db2f36+chromium-156.0.8078.17
|
Class that manages custom preference registrations. More...
#include "include/cef_preference.h"
Public Member Functions | |
| virtual bool | AddPreference (const CefString &name, CefRefPtr< CefValue > default_value)=0 |
| Register a preference with the specified |name| and |default_value|. | |
| virtual bool | SetDefaultPreference (const CefString &name, CefRefPtr< CefValue > value, CefString &error)=0 |
| Override the default value of a previously registered preference. | |
| virtual CefRefPtr< CefValue > | GetDefaultPreference (const CefString &name)=0 |
| Returns a copy of the current default value for the preference with the specified |name|, or NULL if the preference is not registered. | |
Public Member Functions inherited from CefBaseScoped | |
| virtual | ~CefBaseScoped () |
Class that manages custom preference registrations.
|
pure virtual |
Register a preference with the specified |name| and |default_value|.
To avoid conflicts with built-in preferences the |name| value should contain an application-specific prefix followed by a period (e.g. "myapp.value"). The contents of |default_value| will be copied. The data type for the preference will be inferred from |default_value|'s type and cannot be changed after registration. Returns true on success. Returns false if |name| is already registered or if |default_value| has an invalid type. This method must be called from within the scope of the CefBrowserProcessHandler::OnRegisterCustomPreferences callback.
|
pure virtual |
Returns a copy of the current default value for the preference with the specified |name|, or NULL if the preference is not registered.
This method must be called from within OnRegisterCustomPreferences.
|
pure virtual |
Override the default value of a previously registered preference.
|value| is required and must have the same type as the registered default. Its contents will be copied. User and managed values take precedence over this default. Returns false and sets |error| if the preference is not registered or |value| is invalid or has the wrong type. This method must be called from within OnRegisterCustomPreferences.