mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-02 20:26:59 +01:00
Remove an unused patch to ContentBrowserClient (issue #1161).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2044 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
ac4f451c94
commit
4edc996180
@ -951,31 +951,6 @@ void CefContentBrowserClient::OverrideWebkitPrefs(
|
|||||||
!command_line->HasSwitch(switches::kEnableSpellingAutoCorrect);
|
!command_line->HasSwitch(switches::kEnableSpellingAutoCorrect);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkColor CefContentBrowserClient::GetBaseBackgroundColor(
|
|
||||||
content::RenderViewHost* rvh) {
|
|
||||||
CefRefPtr<CefBrowserHostImpl> browser =
|
|
||||||
CefBrowserHostImpl::GetBrowserForHost(rvh);
|
|
||||||
DCHECK(browser.get());
|
|
||||||
|
|
||||||
const CefBrowserSettings& browser_settings = browser->settings();
|
|
||||||
if (CefColorGetA(browser_settings.background_color) > 0) {
|
|
||||||
return SkColorSetRGB(
|
|
||||||
CefColorGetR(browser_settings.background_color),
|
|
||||||
CefColorGetG(browser_settings.background_color),
|
|
||||||
CefColorGetB(browser_settings.background_color));
|
|
||||||
} else {
|
|
||||||
const CefSettings& settings = CefContext::Get()->settings();
|
|
||||||
if (CefColorGetA(settings.background_color) > 0) {
|
|
||||||
return SkColorSetRGB(
|
|
||||||
CefColorGetR(settings.background_color),
|
|
||||||
CefColorGetG(settings.background_color),
|
|
||||||
CefColorGetB(settings.background_color));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return SK_ColorWHITE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefContentBrowserClient::BrowserURLHandlerCreated(
|
void CefContentBrowserClient::BrowserURLHandlerCreated(
|
||||||
content::BrowserURLHandler* handler) {
|
content::BrowserURLHandler* handler) {
|
||||||
// Used to redirect about: URLs to chrome: URLs.
|
// Used to redirect about: URLs to chrome: URLs.
|
||||||
@ -1051,3 +1026,28 @@ CefDevToolsDelegate* CefContentBrowserClient::devtools_delegate() const {
|
|||||||
PrefService* CefContentBrowserClient::pref_service() const {
|
PrefService* CefContentBrowserClient::pref_service() const {
|
||||||
return browser_main_parts_->pref_service();
|
return browser_main_parts_->pref_service();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SkColor CefContentBrowserClient::GetBaseBackgroundColor(
|
||||||
|
content::RenderViewHost* rvh) {
|
||||||
|
CefRefPtr<CefBrowserHostImpl> browser =
|
||||||
|
CefBrowserHostImpl::GetBrowserForHost(rvh);
|
||||||
|
DCHECK(browser.get());
|
||||||
|
|
||||||
|
const CefBrowserSettings& browser_settings = browser->settings();
|
||||||
|
if (CefColorGetA(browser_settings.background_color) > 0) {
|
||||||
|
return SkColorSetRGB(
|
||||||
|
CefColorGetR(browser_settings.background_color),
|
||||||
|
CefColorGetG(browser_settings.background_color),
|
||||||
|
CefColorGetB(browser_settings.background_color));
|
||||||
|
} else {
|
||||||
|
const CefSettings& settings = CefContext::Get()->settings();
|
||||||
|
if (CefColorGetA(settings.background_color) > 0) {
|
||||||
|
return SkColorSetRGB(
|
||||||
|
CefColorGetR(settings.background_color),
|
||||||
|
CefColorGetG(settings.background_color),
|
||||||
|
CefColorGetB(settings.background_color));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SK_ColorWHITE;
|
||||||
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "base/memory/scoped_ptr.h"
|
#include "base/memory/scoped_ptr.h"
|
||||||
#include "base/synchronization/lock.h"
|
#include "base/synchronization/lock.h"
|
||||||
#include "content/public/browser/content_browser_client.h"
|
#include "content/public/browser/content_browser_client.h"
|
||||||
|
#include "third_party/skia/include/core/SkColor.h"
|
||||||
#include "url/gurl.h"
|
#include "url/gurl.h"
|
||||||
|
|
||||||
class CefBrowserInfo;
|
class CefBrowserInfo;
|
||||||
@ -133,7 +134,6 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
|||||||
void ResourceDispatcherHostCreated() override;
|
void ResourceDispatcherHostCreated() override;
|
||||||
void OverrideWebkitPrefs(content::RenderViewHost* rvh,
|
void OverrideWebkitPrefs(content::RenderViewHost* rvh,
|
||||||
content::WebPreferences* prefs) override;
|
content::WebPreferences* prefs) override;
|
||||||
SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) override;
|
|
||||||
void BrowserURLHandlerCreated(
|
void BrowserURLHandlerCreated(
|
||||||
content::BrowserURLHandler* handler) override;
|
content::BrowserURLHandler* handler) override;
|
||||||
std::string GetDefaultDownloadName() override;
|
std::string GetDefaultDownloadName() override;
|
||||||
@ -170,6 +170,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
|||||||
PrefService* pref_service() const;
|
PrefService* pref_service() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh);
|
||||||
|
|
||||||
CefBrowserMainParts* browser_main_parts_;
|
CefBrowserMainParts* browser_main_parts_;
|
||||||
|
|
||||||
scoped_ptr<content::PluginServiceFilter> plugin_service_filter_;
|
scoped_ptr<content::PluginServiceFilter> plugin_service_filter_;
|
||||||
|
@ -59,12 +59,9 @@ patches = [
|
|||||||
'path': '../content/',
|
'path': '../content/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# Allow customization of the background color with Aura.
|
|
||||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=1161
|
|
||||||
#
|
|
||||||
# Allow specification of a custom WebContentsView.
|
# Allow specification of a custom WebContentsView.
|
||||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=1257
|
# http://code.google.com/p/chromiumembedded/issues/detail?id=1257
|
||||||
'name': 'public_browser_1161_1257',
|
'name': 'public_browser_1257',
|
||||||
'path': '../content/public/browser/',
|
'path': '../content/public/browser/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,40 +1,3 @@
|
|||||||
diff --git content_browser_client.cc content_browser_client.cc
|
|
||||||
index 67d2df7..e29a5d9 100644
|
|
||||||
--- content_browser_client.cc
|
|
||||||
+++ content_browser_client.cc
|
|
||||||
@@ -278,6 +278,10 @@ bool ContentBrowserClient::IsFastShutdownPossible() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+SkColor ContentBrowserClient::GetBaseBackgroundColor(RenderViewHost* rvh) {
|
|
||||||
+ return SK_ColorWHITE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
base::FilePath ContentBrowserClient::GetDefaultDownloadDirectory() {
|
|
||||||
return base::FilePath();
|
|
||||||
}
|
|
||||||
diff --git content_browser_client.h content_browser_client.h
|
|
||||||
index c4ab6f3..08583cf 100644
|
|
||||||
--- content_browser_client.h
|
|
||||||
+++ content_browser_client.h
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#include "net/url_request/url_request_interceptor.h"
|
|
||||||
#include "net/url_request/url_request_job_factory.h"
|
|
||||||
#include "storage/browser/fileapi/file_system_context.h"
|
|
||||||
+#include "third_party/skia/include/core/SkColor.h"
|
|
||||||
#include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
|
|
||||||
#include "ui/base/window_open_disposition.h"
|
|
||||||
|
|
||||||
@@ -510,6 +511,9 @@ class CONTENT_EXPORT ContentBrowserClient {
|
|
||||||
// Clears browser cookies.
|
|
||||||
virtual void ClearCookies(RenderViewHost* rvh) {}
|
|
||||||
|
|
||||||
+ // Returns the base background color.
|
|
||||||
+ virtual SkColor GetBaseBackgroundColor(RenderViewHost* rvh);
|
|
||||||
+
|
|
||||||
// Returns the default download directory.
|
|
||||||
// This can be called on any thread.
|
|
||||||
virtual base::FilePath GetDefaultDownloadDirectory();
|
|
||||||
diff --git web_contents.cc web_contents.cc
|
diff --git web_contents.cc web_contents.cc
|
||||||
index aece7c6..63da2c9 100644
|
index aece7c6..63da2c9 100644
|
||||||
--- web_contents.cc
|
--- web_contents.cc
|
Loading…
x
Reference in New Issue
Block a user