chrome: Support configuration of renderer prefs (see issue #2969)

This commit is contained in:
Marshall Greenblatt
2021-04-17 21:12:54 -04:00
parent 9756e15a23
commit cf1074cf49
8 changed files with 154 additions and 107 deletions

View File

@@ -6,6 +6,7 @@
#include "libcef/browser/browser_info_manager.h"
#include "libcef/browser/browser_platform_delegate.h"
#include "libcef/browser/context.h"
#include "libcef/browser/image_impl.h"
#include "libcef/browser/navigation_entry_impl.h"
#include "libcef/browser/thread_util.h"
@@ -826,6 +827,16 @@ int CefBrowserHostBase::browser_id() const {
return browser_info_->browser_id();
}
SkColor CefBrowserHostBase::GetBackgroundColor() const {
// Don't use |platform_delegate_| because it's not thread-safe.
return CefContext::Get()->GetBackgroundColor(
&settings_, IsWindowless() ? STATE_ENABLED : STATE_DISABLED);
}
bool CefBrowserHostBase::IsWindowless() const {
return false;
}
content::WebContents* CefBrowserHostBase::GetWebContents() const {
CEF_REQUIRE_UIT();
return contents_delegate_->web_contents();