Support registration of custom preferences.

Custom global and request context preferences can now be registered via
CefBrowserProcessHandler::OnRegisterCustomPreferences. CefRequestContext
now extends CefPreferenceManager and global preferences can be accessed
via CefPreferenceManager::GetGlobalPreferenceManager.
This commit is contained in:
Marshall Greenblatt
2022-10-25 18:50:29 -04:00
parent 767c4422ac
commit 09bb643ef6
45 changed files with 2022 additions and 531 deletions

View File

@@ -24,6 +24,11 @@ class ClientAppBrowser : public ClientApp, public CefBrowserProcessHandler {
CefRefPtr<ClientAppBrowser> app,
CefRefPtr<CefCommandLine> command_line) {}
virtual void OnRegisterCustomPreferences(
CefRefPtr<ClientAppBrowser> app,
cef_preferences_type_t type,
CefRawPtr<CefPreferenceRegistrar> registrar) {}
virtual void OnContextInitialized(CefRefPtr<ClientAppBrowser> app) {}
virtual void OnBeforeChildProcessLaunch(
@@ -59,6 +64,9 @@ class ClientAppBrowser : public ClientApp, public CefBrowserProcessHandler {
}
// CefBrowserProcessHandler methods.
void OnRegisterCustomPreferences(
cef_preferences_type_t type,
CefRawPtr<CefPreferenceRegistrar> registrar) override;
void OnContextInitialized() override;
void OnBeforeChildProcessLaunch(
CefRefPtr<CefCommandLine> command_line) override;