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/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
10 #include "content/public/common/renderer_preferences.h" | 11 #include "content/public/common/renderer_preferences.h" |
11 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
12 | 13 |
13 #if defined(OS_LINUX) || defined(OS_ANDROID) | 14 #if defined(OS_LINUX) || defined(OS_ANDROID) |
14 #include "ui/gfx/font_render_params.h" | 15 #include "ui/gfx/font_render_params.h" |
15 #endif | 16 #endif |
16 | 17 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 linux_ui->GetInactiveSelectionFgColor(); | 81 linux_ui->GetInactiveSelectionFgColor(); |
81 } | 82 } |
82 | 83 |
83 // If we have a linux_ui object, set the caret blink interval regardless of | 84 // If we have a linux_ui object, set the caret blink interval regardless of |
84 // whether we're in native theme mode. | 85 // whether we're in native theme mode. |
85 prefs->caret_blink_interval = linux_ui->GetCursorBlinkInterval(); | 86 prefs->caret_blink_interval = linux_ui->GetCursorBlinkInterval(); |
86 } | 87 } |
87 #endif | 88 #endif |
88 | 89 |
89 #if defined(OS_LINUX) || defined(OS_ANDROID) | 90 #if defined(OS_LINUX) || defined(OS_ANDROID) |
90 const gfx::FontRenderParams& params = gfx::GetDefaultWebKitFontRenderParams(); | 91 CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params, |
| 92 (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(true), NULL))); |
91 prefs->should_antialias_text = params.antialiasing; | 93 prefs->should_antialias_text = params.antialiasing; |
92 prefs->use_subpixel_positioning = params.subpixel_positioning; | 94 prefs->use_subpixel_positioning = params.subpixel_positioning; |
93 prefs->hinting = params.hinting; | 95 prefs->hinting = params.hinting; |
94 prefs->use_autohinter = params.autohinter; | 96 prefs->use_autohinter = params.autohinter; |
95 prefs->use_bitmaps = params.use_bitmaps; | 97 prefs->use_bitmaps = params.use_bitmaps; |
96 prefs->subpixel_rendering = params.subpixel_rendering; | 98 prefs->subpixel_rendering = params.subpixel_rendering; |
97 #endif | 99 #endif |
98 | 100 |
99 #if !defined(OS_MACOSX) | 101 #if !defined(OS_MACOSX) |
100 prefs->plugin_fullscreen_allowed = | 102 prefs->plugin_fullscreen_allowed = |
101 pref_service->GetBoolean(prefs::kFullscreenAllowed); | 103 pref_service->GetBoolean(prefs::kFullscreenAllowed); |
102 #endif | 104 #endif |
103 } | 105 } |
104 | 106 |
105 } // namespace renderer_preferences_util | 107 } // namespace renderer_preferences_util |
OLD | NEW |