mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefBrowserSettings.background_color for custom background color assignment on a per-browser basis and fix assignment of the default value (issue #1161).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1656 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#include "content/public/browser/web_contents_view.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "net/base/net_util.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
|
||||
// static
|
||||
CefDevToolsFrontend* CefDevToolsFrontend::Show(
|
||||
@ -26,9 +27,16 @@ CefDevToolsFrontend* CefDevToolsFrontend::Show(
|
||||
const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefBrowserSettings& settings) {
|
||||
CefBrowserSettings new_settings = settings;
|
||||
if (CefColorGetA(new_settings.background_color) == 0) {
|
||||
// Use white as the default background color for DevTools instead of the
|
||||
// CefSettings.background_color value.
|
||||
new_settings.background_color = SK_ColorWHITE;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> frontend_browser =
|
||||
CefBrowserHostImpl::Create(windowInfo, client, CefString(),
|
||||
settings,
|
||||
new_settings,
|
||||
inspected_browser->GetWindowHandle(), true,
|
||||
inspected_browser->GetRequestContext());
|
||||
|
||||
|
Reference in New Issue
Block a user