mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Support configuration of preferences during runtime (issue #1709)
- Preferences are now associated with a CefRequestContext instead of being stored globally. - Add methods to CefRequestContext for getting/setting preferences.
This commit is contained in:
@@ -61,6 +61,14 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
CefRefPtr<CefSchemeHandlerFactory> factory) override;
|
||||
bool ClearSchemeHandlerFactories() override;
|
||||
void PurgePluginListCache(bool reload_pages) override;
|
||||
bool HasPreference(const CefString& name) override;
|
||||
CefRefPtr<CefValue> GetPreference(const CefString& name) override;
|
||||
CefRefPtr<CefDictionaryValue> GetAllPreferences(
|
||||
bool include_defaults) override;
|
||||
bool CanSetPreference(const CefString& name) override;
|
||||
bool SetPreference(const CefString& name,
|
||||
CefRefPtr<CefValue> value,
|
||||
CefString& error) override;
|
||||
|
||||
const CefRequestContextSettings& settings() const { return settings_; }
|
||||
|
||||
@@ -74,6 +82,9 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
CefRequestContextImpl(CefRefPtr<CefRequestContextImpl> other,
|
||||
CefRefPtr<CefRequestContextHandler> handler);
|
||||
|
||||
// Make sure the browser context exists. Only called on the UI thread.
|
||||
void EnsureBrowserContext();
|
||||
|
||||
void GetBrowserContextOnUIThread(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
||||
const BrowserContextCallback& callback);
|
||||
|
Reference in New Issue
Block a user