summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_preferences_util.cc
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-06-28 21:49:31 +0100
committerKristian Monsen <kristianm@google.com>2011-07-08 17:55:00 +0100
commitddb351dbec246cf1fab5ec20d2d5520909041de1 (patch)
tree158e3fb57bdcac07c7f1e767fde3c70687c9fbb1 /chrome/browser/renderer_preferences_util.cc
parent6b92e04f5f151c896e3088e86f70db7081009308 (diff)
downloadexternal_chromium-ddb351dbec246cf1fab5ec20d2d5520909041de1.zip
external_chromium-ddb351dbec246cf1fab5ec20d2d5520909041de1.tar.gz
external_chromium-ddb351dbec246cf1fab5ec20d2d5520909041de1.tar.bz2
Merge Chromium at r12.0.742.93: Initial merge by git
Change-Id: Ic5ee2fec31358bbee305f7e915442377bfa6cda6
Diffstat (limited to 'chrome/browser/renderer_preferences_util.cc')
-rw-r--r--chrome/browser/renderer_preferences_util.cc29
1 files changed, 18 insertions, 11 deletions
diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc
index e487b93..3f03125 100644
--- a/chrome/browser/renderer_preferences_util.cc
+++ b/chrome/browser/renderer_preferences_util.cc
@@ -4,10 +4,12 @@
#include "chrome/browser/renderer_preferences_util.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/pref_names.h"
#if defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/ui/gtk/gtk_theme_provider.h"
+#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#endif
@@ -18,18 +20,20 @@ void UpdateFromSystemSettings(RendererPreferences* prefs, Profile* profile) {
gtk_util::UpdateGtkFontSettings(prefs);
#if !defined(OS_CHROMEOS)
- GtkThemeProvider* provider = GtkThemeProvider::GetFrom(profile);
-
- prefs->focus_ring_color = provider->get_focus_ring_color();
- prefs->thumb_active_color = provider->get_thumb_active_color();
- prefs->thumb_inactive_color = provider->get_thumb_inactive_color();
- prefs->track_color = provider->get_track_color();
- prefs->active_selection_bg_color = provider->get_active_selection_bg_color();
- prefs->active_selection_fg_color = provider->get_active_selection_fg_color();
+ GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
+
+ prefs->focus_ring_color = theme_service->get_focus_ring_color();
+ prefs->thumb_active_color = theme_service->get_thumb_active_color();
+ prefs->thumb_inactive_color = theme_service->get_thumb_inactive_color();
+ prefs->track_color = theme_service->get_track_color();
+ prefs->active_selection_bg_color =
+ theme_service->get_active_selection_bg_color();
+ prefs->active_selection_fg_color =
+ theme_service->get_active_selection_fg_color();
prefs->inactive_selection_bg_color =
- provider->get_inactive_selection_bg_color();
+ theme_service->get_inactive_selection_bg_color();
prefs->inactive_selection_fg_color =
- provider->get_inactive_selection_fg_color();
+ theme_service->get_inactive_selection_fg_color();
#else
prefs->focus_ring_color = SkColorSetRGB(0x50, 0x7A, 0xD5);
prefs->active_selection_bg_color = SkColorSetRGB(0xDC, 0xE4, 0xFA);
@@ -39,6 +43,9 @@ void UpdateFromSystemSettings(RendererPreferences* prefs, Profile* profile) {
#endif // defined(OS_CHROMEOS)
#endif // defined(TOOLKIT_USES_GTK)
+
+ prefs->enable_referrers =
+ profile->GetPrefs()->GetBoolean(prefs::kEnableReferrers);
}
} // renderer_preferences_util