Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1203)

Side by Side Diff: chrome/browser/renderer_preferences_util.cc

Issue 541103002: Introduce ChromeZoomLevelPref, make zoom level prefs independent of profile prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix HostZOomMapBrowserTest. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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);
gab 2014/10/02 20:58:42 It was kind of nice to have this in a single place
wjmaclean 2014/10/03 18:53:22 This was originally done since not all callsites h
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 #if defined(OS_CHROMEOS) 40 #if defined(OS_CHROMEOS)
42 // This color is 0x544d90fe modulated with 0xffffff. 41 // This color is 0x544d90fe modulated with 0xffffff.
43 prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA); 42 prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA);
44 prefs->active_selection_fg_color = SK_ColorBLACK; 43 prefs->active_selection_fg_color = SK_ColorBLACK;
45 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA); 44 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA);
46 prefs->inactive_selection_fg_color = SK_ColorBLACK; 45 prefs->inactive_selection_fg_color = SK_ColorBLACK;
47 #endif 46 #endif
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 prefs->subpixel_rendering = params.subpixel_rendering; 83 prefs->subpixel_rendering = params.subpixel_rendering;
85 #endif 84 #endif
86 85
87 #if !defined(OS_MACOSX) 86 #if !defined(OS_MACOSX)
88 prefs->plugin_fullscreen_allowed = 87 prefs->plugin_fullscreen_allowed =
89 pref_service->GetBoolean(prefs::kFullscreenAllowed); 88 pref_service->GetBoolean(prefs::kFullscreenAllowed);
90 #endif 89 #endif
91 } 90 }
92 91
93 } // namespace renderer_preferences_util 92 } // namespace renderer_preferences_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698