- Support runtime configuration of renderer-related preferences (issue #1501).

- Persist modified user preferences including per-host zoom settings when a
  cache_path value is specified and persist_user_preferences is set to true
  via CefSettings or CefRequestContextSettings.
- Avoid the need to duplicate files from chrome/ by having CefBrowserContext
  extend Chrome's Profile class.
This commit is contained in:
Marshall Greenblatt
2015-10-16 20:44:00 -04:00
parent 487ea8a99d
commit 936e595fe5
37 changed files with 1135 additions and 293 deletions

View File

@@ -10,6 +10,7 @@
#include "libcef/browser/url_request_context_getter_proxy.h"
#include "base/logging.h"
#include "chrome/browser/font_family_cache.h"
#include "components/guest_view/common/guest_view_constants.h"
#include "content/browser/streams/stream_context.h"
#include "content/public/browser/storage_partition.h"
@@ -27,6 +28,12 @@ bool ShouldProxyUserData(const void* key) {
if (key == guest_view::kGuestViewManagerKeyName)
return true;
// If this value is not proxied then there will be a use-after-free while
// destroying the FontFamilyCache because it will try to access the
// ProxyService owned by CefBrowserContextImpl (which has already been freed).
if (key == kFontFamilyCacheKey)
return true;
return false;
}
@@ -43,6 +50,8 @@ CefBrowserContextProxy::CefBrowserContextProxy(
}
CefBrowserContextProxy::~CefBrowserContextProxy() {
Shutdown();
parent_->RemoveProxy(this);
}
@@ -142,6 +151,14 @@ content::PermissionManager* CefBrowserContextProxy::GetPermissionManager() {
return parent_->GetPermissionManager();
}
PrefService* CefBrowserContextProxy::GetPrefs() {
return parent_->GetPrefs();
}
const PrefService* CefBrowserContextProxy::GetPrefs() const {
return parent_->GetPrefs();
}
const CefRequestContextSettings& CefBrowserContextProxy::GetSettings() const {
return parent_->GetSettings();
}
@@ -173,7 +190,3 @@ net::URLRequestContextGetter*
HostContentSettingsMap* CefBrowserContextProxy::GetHostContentSettingsMap() {
return parent_->GetHostContentSettingsMap();
}
PrefService* CefBrowserContextProxy::GetPrefs() {
return parent_->GetPrefs();
}