diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-10 21:40:32 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-10 21:40:32 +0000 |
commit | 93623c5d8fd1847dc31b67ed15779a3267a78d97 (patch) | |
tree | e311599b977576d6b94ab47829ccfffcbaaf9fad /chrome/browser/tab_contents | |
parent | 9fb89471331ec0b7fad12ffafa505aa6b8425fa5 (diff) | |
download | chromium_src-93623c5d8fd1847dc31b67ed15779a3267a78d97.zip chromium_src-93623c5d8fd1847dc31b67ed15779a3267a78d97.tar.gz chromium_src-93623c5d8fd1847dc31b67ed15779a3267a78d97.tar.bz2 |
re-apply r34183
---------------
linux: theme scrollbars from GTK theme
Pick the color of the slider's thumbpart and rail from the GTK theme.
We cannot match the exact visual appearance of the GTK theme, as
rendering engines can make arbitrary changes to the actual visual
appearance. But by sampling a representative set of pixels, we ensure
that we will at least match the general color scheme.
BUG=10949
patch by <markus [at] chromium>
original review: http://codereview.chromium.org/400027/show
Review URL: http://codereview.chromium.org/479006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/interstitial_page.h | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 6 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index 7212566..d3da46e 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -23,6 +23,7 @@ #include "chrome/browser/tab_contents/tab_contents_view.h" #include "chrome/common/bindings_policy.h" #if defined(TOOLKIT_GTK) +#include "chrome/browser/gtk/gtk_theme_provider.h" #include "chrome/common/gtk_util.h" #endif #include "chrome/common/notification_service.h" @@ -144,7 +145,8 @@ InterstitialPage::InterstitialPage(TabContents* tab, DCHECK(new_navigation || !tab->controller().pending_entry()); #if defined(TOOLKIT_GTK) - gtk_util::InitRendererPrefsFromGtkSettings(&renderer_preferences_); + gtk_util::InitRendererPrefsFromGtkSettings(&renderer_preferences_, + GtkThemeProvider::GetFrom(tab->profile())->UseGtkTheme()); #endif } diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h index aff6a74..0312131 100644 --- a/chrome/browser/tab_contents/interstitial_page.h +++ b/chrome/browser/tab_contents/interstitial_page.h @@ -107,7 +107,7 @@ class InterstitialPage : public NotificationObserver, const std::wstring& title); virtual void DomOperationResponse(const std::string& json_string, int automation_id); - virtual RendererPreferences GetRendererPrefs() const { + virtual RendererPreferences GetRendererPrefs(Profile* profile) const { return renderer_preferences_; } diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 964bff1..30b393d 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -45,6 +45,7 @@ #include "chrome/browser/renderer_host/resource_request_details.h" #include "chrome/browser/renderer_host/site_instance.h" #include "chrome/browser/renderer_host/web_cache_manager.h" +#include "chrome/browser/renderer_preferences_util.h" #include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/interstitial_page.h" #include "chrome/browser/tab_contents/navigation_entry.h" @@ -259,7 +260,8 @@ TabContents::TabContents(Profile* profile, last_javascript_message_dismissal_(), suppress_javascript_messages_(false), is_showing_before_unload_dialog_(false), - renderer_preferences_(platform_util::GetInitedRendererPreferences()), + renderer_preferences_( + renderer_preferences_util::GetInitedRendererPreferences(profile)), opener_dom_ui_type_(DOMUIFactory::kNoDOMUI) { #if defined(OS_CHROMEOS) // Make sure the thumbnailer is started before starting the render manager. @@ -1882,7 +1884,7 @@ RenderViewHostDelegate::AutoFill* TabContents::GetAutoFillDelegate() { return autofill_manager_.get(); } -RendererPreferences TabContents::GetRendererPrefs() const { +RendererPreferences TabContents::GetRendererPrefs(Profile* profile) const { return renderer_preferences_; } diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 072e430..18f0d44 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -903,7 +903,7 @@ class TabContents : public PageNavigator, virtual void PageHasOSDD(RenderViewHost* render_view_host, int32 page_id, const GURL& url, bool autodetected); virtual GURL GetAlternateErrorPageURL() const; - virtual RendererPreferences GetRendererPrefs() const; + virtual RendererPreferences GetRendererPrefs(Profile* profile) const; virtual WebPreferences GetWebkitPrefs(); virtual void OnJSOutOfMemory(); virtual void OnCrossSiteResponse(int new_render_process_host_id, |