Chromium Embedded Framework (CEF)  116.0.6+gc182ee2+chromium-116.0.5845.10
CefPreferenceRegistrar Class Referenceabstract

Class that manages custom preference registrations. More...

#include "include/cef_preference.h"

Inheritance diagram for CefPreferenceRegistrar:
CefBaseScoped

Public Member Functions

virtual bool AddPreference (const CefString &name, CefRefPtr< CefValue > default_value)=0
 Register a preference with the specified |name| and |default_value|. More...
 
- Public Member Functions inherited from CefBaseScoped
virtual ~CefBaseScoped ()
 

Detailed Description

Class that manages custom preference registrations.

Member Function Documentation

◆ AddPreference()

virtual bool CefPreferenceRegistrar::AddPreference ( const CefString name,
CefRefPtr< CefValue default_value 
)
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.


The documentation for this class was generated from the following file: