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

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

Issue 586933003: fling: Remove a bunch of code for configuring fling curves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/resources/gesture_config.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 20 matching lines...) Expand all
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); 37 prefs->default_zoom_level = pref_service->GetDouble(prefs::kDefaultZoomLevel);
38 38
39 #if defined(USE_DEFAULT_RENDER_THEME) 39 #if defined(USE_DEFAULT_RENDER_THEME)
40 prefs->focus_ring_color = SkColorSetRGB(0x4D, 0x90, 0xFE); 40 prefs->focus_ring_color = SkColorSetRGB(0x4D, 0x90, 0xFE);
41
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;
48 #endif 47 #endif
49
50 prefs->touchpad_fling_profile[0] =
51 pref_service->GetDouble(prefs::kFlingCurveTouchpadAlpha);
52 prefs->touchpad_fling_profile[1] =
53 pref_service->GetDouble(prefs::kFlingCurveTouchpadBeta);
54 prefs->touchpad_fling_profile[2] =
55 pref_service->GetDouble(prefs::kFlingCurveTouchpadGamma);
56 prefs->touchscreen_fling_profile[0] =
57 pref_service->GetDouble(prefs::kFlingCurveTouchscreenAlpha);
58 prefs->touchscreen_fling_profile[1] =
59 pref_service->GetDouble(prefs::kFlingCurveTouchscreenBeta);
60 prefs->touchscreen_fling_profile[2] =
61 pref_service->GetDouble(prefs::kFlingCurveTouchscreenGamma);
62 #endif 48 #endif
63 49
64 #if defined(TOOLKIT_VIEWS) 50 #if defined(TOOLKIT_VIEWS)
65 prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0; 51 prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0;
66 #endif 52 #endif
67 53
68 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) 54 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
69 views::LinuxUI* linux_ui = views::LinuxUI::instance(); 55 views::LinuxUI* linux_ui = views::LinuxUI::instance();
70 if (linux_ui) { 56 if (linux_ui) {
71 if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { 57 if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) {
(...skipping 26 matching lines...) Expand all
98 prefs->subpixel_rendering = params.subpixel_rendering; 84 prefs->subpixel_rendering = params.subpixel_rendering;
99 #endif 85 #endif
100 86
101 #if !defined(OS_MACOSX) 87 #if !defined(OS_MACOSX)
102 prefs->plugin_fullscreen_allowed = 88 prefs->plugin_fullscreen_allowed =
103 pref_service->GetBoolean(prefs::kFullscreenAllowed); 89 pref_service->GetBoolean(prefs::kFullscreenAllowed);
104 #endif 90 #endif
105 } 91 }
106 92
107 } // namespace renderer_preferences_util 93 } // namespace renderer_preferences_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/gesture_config.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698