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 "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 namespace renderer_preferences_util { | 28 namespace renderer_preferences_util { |
29 | 29 |
30 void UpdateFromSystemSettings( | 30 void UpdateFromSystemSettings( |
31 content::RendererPreferences* prefs, Profile* profile) { | 31 content::RendererPreferences* prefs, Profile* profile) { |
32 const PrefService* pref_service = profile->GetPrefs(); | 32 const PrefService* pref_service = profile->GetPrefs(); |
33 prefs->accept_languages = pref_service->GetString(prefs::kAcceptLanguages); | 33 prefs->accept_languages = pref_service->GetString(prefs::kAcceptLanguages); |
34 prefs->enable_referrers = pref_service->GetBoolean(prefs::kEnableReferrers); | 34 prefs->enable_referrers = pref_service->GetBoolean(prefs::kEnableReferrers); |
35 prefs->enable_do_not_track = | 35 prefs->enable_do_not_track = |
36 pref_service->GetBoolean(prefs::kEnableDoNotTrack); | 36 pref_service->GetBoolean(prefs::kEnableDoNotTrack); |
37 prefs->default_zoom_level = pref_service->GetDouble(prefs::kDefaultZoomLevel); | |
38 | 37 |
39 #if defined(USE_DEFAULT_RENDER_THEME) | 38 #if defined(USE_DEFAULT_RENDER_THEME) |
40 prefs->focus_ring_color = SkColorSetRGB(0x4D, 0x90, 0xFE); | 39 prefs->focus_ring_color = SkColorSetRGB(0x4D, 0x90, 0xFE); |
41 | 40 |
42 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
43 // This color is 0x544d90fe modulated with 0xffffff. | 42 // This color is 0x544d90fe modulated with 0xffffff. |
44 prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA); | 43 prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA); |
45 prefs->active_selection_fg_color = SK_ColorBLACK; | 44 prefs->active_selection_fg_color = SK_ColorBLACK; |
46 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA); | 45 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA); |
47 prefs->inactive_selection_fg_color = SK_ColorBLACK; | 46 prefs->inactive_selection_fg_color = SK_ColorBLACK; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 prefs->subpixel_rendering = params.subpixel_rendering; | 97 prefs->subpixel_rendering = params.subpixel_rendering; |
99 #endif | 98 #endif |
100 | 99 |
101 #if !defined(OS_MACOSX) | 100 #if !defined(OS_MACOSX) |
102 prefs->plugin_fullscreen_allowed = | 101 prefs->plugin_fullscreen_allowed = |
103 pref_service->GetBoolean(prefs::kFullscreenAllowed); | 102 pref_service->GetBoolean(prefs::kFullscreenAllowed); |
104 #endif | 103 #endif |
105 } | 104 } |
106 | 105 |
107 } // namespace renderer_preferences_util | 106 } // namespace renderer_preferences_util |
OLD | NEW |