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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 prefs->inactive_selection_bg_color = | 92 prefs->inactive_selection_bg_color = |
93 theme_service->get_inactive_selection_bg_color(); | 93 theme_service->get_inactive_selection_bg_color(); |
94 prefs->inactive_selection_fg_color = | 94 prefs->inactive_selection_fg_color = |
95 theme_service->get_inactive_selection_fg_color(); | 95 theme_service->get_inactive_selection_fg_color(); |
96 | 96 |
97 const base::TimeDelta cursor_blink_time = gfx::GetCursorBlinkCycle(); | 97 const base::TimeDelta cursor_blink_time = gfx::GetCursorBlinkCycle(); |
98 prefs->caret_blink_interval = | 98 prefs->caret_blink_interval = |
99 cursor_blink_time.InMilliseconds() ? | 99 cursor_blink_time.InMilliseconds() ? |
100 cursor_blink_time.InMilliseconds() / kGtkCursorBlinkCycleFactor : | 100 cursor_blink_time.InMilliseconds() / kGtkCursorBlinkCycleFactor : |
101 0; | 101 0; |
102 #elif defined(USE_ASH) | 102 #elif defined(USE_DEFAULT_RENDER_THEME) |
103 // This color is 0x544d90fe modulated with 0xffffff. | 103 // This color is 0x544d90fe modulated with 0xffffff. |
104 prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA); | 104 prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA); |
105 prefs->active_selection_fg_color = SK_ColorBLACK; | 105 prefs->active_selection_fg_color = SK_ColorBLACK; |
106 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA); | 106 prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA); |
107 prefs->inactive_selection_fg_color = SK_ColorBLACK; | 107 prefs->inactive_selection_fg_color = SK_ColorBLACK; |
108 #endif | 108 #endif |
109 | 109 |
110 #if defined(OS_LINUX) || defined(OS_ANDROID) | 110 #if defined(OS_LINUX) || defined(OS_ANDROID) |
111 const gfx::FontRenderParams& params = gfx::GetDefaultWebKitFontRenderParams(); | 111 const gfx::FontRenderParams& params = gfx::GetDefaultWebKitFontRenderParams(); |
112 prefs->should_antialias_text = params.antialiasing; | 112 prefs->should_antialias_text = params.antialiasing; |
113 prefs->use_subpixel_positioning = params.subpixel_positioning; | 113 prefs->use_subpixel_positioning = params.subpixel_positioning; |
114 prefs->hinting = GetRendererPreferencesHintingEnum(params.hinting); | 114 prefs->hinting = GetRendererPreferencesHintingEnum(params.hinting); |
115 prefs->use_autohinter = params.autohinter; | 115 prefs->use_autohinter = params.autohinter; |
116 prefs->use_bitmaps = params.use_bitmaps; | 116 prefs->use_bitmaps = params.use_bitmaps; |
117 prefs->subpixel_rendering = | 117 prefs->subpixel_rendering = |
118 GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering); | 118 GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering); |
119 #endif | 119 #endif |
120 } | 120 } |
121 | 121 |
122 } // renderer_preferences_util | 122 } // renderer_preferences_util |
OLD | NEW |