Merge revision 1656 changes:

- 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/branches/1916@1657 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-04-15 19:07:45 +00:00
parent d6f47eba76
commit 711cfe2ef6
10 changed files with 101 additions and 8 deletions

View File

@ -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());