OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/renderer_preferences_util.h" | 5 #include "chrome/browser/renderer_preferences_util.h" |
6 | 6 |
7 #include "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
10 #include "content/public/common/renderer_preferences.h" | 10 #include "content/public/common/renderer_preferences.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 } | 69 } |
70 #endif // defined(OS_LINUX) || defined(OS_ANDROID) | 70 #endif // defined(OS_LINUX) || defined(OS_ANDROID) |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 void UpdateFromSystemSettings( | 74 void UpdateFromSystemSettings( |
75 content::RendererPreferences* prefs, Profile* profile) { | 75 content::RendererPreferences* prefs, Profile* profile) { |
76 const PrefService* pref_service = profile->GetPrefs(); | 76 const PrefService* pref_service = profile->GetPrefs(); |
77 prefs->enable_referrers = pref_service->GetBoolean(prefs::kEnableReferrers); | 77 prefs->enable_referrers = pref_service->GetBoolean(prefs::kEnableReferrers); |
| 78 prefs->enable_do_not_track = |
| 79 pref_service->GetBoolean(prefs::kEnableDoNotTrack); |
78 prefs->default_zoom_level = pref_service->GetDouble(prefs::kDefaultZoomLevel); | 80 prefs->default_zoom_level = pref_service->GetDouble(prefs::kDefaultZoomLevel); |
79 | 81 |
80 #if defined(TOOLKIT_GTK) | 82 #if defined(TOOLKIT_GTK) |
81 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); | 83 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); |
82 prefs->focus_ring_color = theme_service->get_focus_ring_color(); | 84 prefs->focus_ring_color = theme_service->get_focus_ring_color(); |
83 prefs->thumb_active_color = theme_service->get_thumb_active_color(); | 85 prefs->thumb_active_color = theme_service->get_thumb_active_color(); |
84 prefs->thumb_inactive_color = theme_service->get_thumb_inactive_color(); | 86 prefs->thumb_inactive_color = theme_service->get_thumb_inactive_color(); |
85 prefs->track_color = theme_service->get_track_color(); | 87 prefs->track_color = theme_service->get_track_color(); |
86 prefs->active_selection_bg_color = | 88 prefs->active_selection_bg_color = |
87 theme_service->get_active_selection_bg_color(); | 89 theme_service->get_active_selection_bg_color(); |
(...skipping 23 matching lines...) Expand all Loading... |
111 prefs->use_subpixel_positioning = params.subpixel_positioning; | 113 prefs->use_subpixel_positioning = params.subpixel_positioning; |
112 prefs->hinting = GetRendererPreferencesHintingEnum(params.hinting); | 114 prefs->hinting = GetRendererPreferencesHintingEnum(params.hinting); |
113 prefs->use_autohinter = params.autohinter; | 115 prefs->use_autohinter = params.autohinter; |
114 prefs->use_bitmaps = params.use_bitmaps; | 116 prefs->use_bitmaps = params.use_bitmaps; |
115 prefs->subpixel_rendering = | 117 prefs->subpixel_rendering = |
116 GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering); | 118 GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering); |
117 #endif | 119 #endif |
118 } | 120 } |
119 | 121 |
120 } // renderer_preferences_util | 122 } // renderer_preferences_util |
OLD | NEW |