| 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" |
| 11 #include "content/public/browser/host_zoom_map.h" | 11 #include "content/public/browser/host_zoom_map.h" |
| 12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
| 13 #include "content/public/common/renderer_preferences.h" | 13 #include "content/public/common/renderer_preferences.h" |
| 14 #include "third_party/skia/include/core/SkColor.h" | 14 #include "third_party/skia/include/core/SkColor.h" |
| 15 | 15 |
| 16 #if defined(OS_LINUX) || defined(OS_ANDROID) | 16 #if defined(OS_LINUX) || defined(OS_ANDROID) |
| 17 #include "ui/gfx/font_render_params.h" | 17 #include "ui/gfx/font_render_params.h" |
| 18 #include "ui/gfx/platform_font.h" | |
| 19 #endif | 18 #endif |
| 20 | 19 |
| 21 #if !defined(OS_ANDROID) | 20 #if !defined(OS_ANDROID) |
| 22 #include "components/ui/zoom/zoom_controller.h" | 21 #include "components/ui/zoom/zoom_controller.h" |
| 23 #endif | 22 #endif |
| 24 | 23 |
| 25 #if defined(TOOLKIT_VIEWS) | 24 #if defined(TOOLKIT_VIEWS) |
| 26 #include "ui/views/controls/textfield/textfield.h" | 25 #include "ui/views/controls/textfield/textfield.h" |
| 27 #endif | 26 #endif |
| 28 | 27 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 103 |
| 105 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) | 104 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) |
| 106 CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params, | 105 CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params, |
| 107 (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL))); | 106 (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL))); |
| 108 prefs->should_antialias_text = params.antialiasing; | 107 prefs->should_antialias_text = params.antialiasing; |
| 109 prefs->use_subpixel_positioning = params.subpixel_positioning; | 108 prefs->use_subpixel_positioning = params.subpixel_positioning; |
| 110 prefs->hinting = params.hinting; | 109 prefs->hinting = params.hinting; |
| 111 prefs->use_autohinter = params.autohinter; | 110 prefs->use_autohinter = params.autohinter; |
| 112 prefs->use_bitmaps = params.use_bitmaps; | 111 prefs->use_bitmaps = params.use_bitmaps; |
| 113 prefs->subpixel_rendering = params.subpixel_rendering; | 112 prefs->subpixel_rendering = params.subpixel_rendering; |
| 114 | |
| 115 #if defined(OS_LINUX) | |
| 116 scoped_refptr<gfx::PlatformFont> default_font( | |
| 117 gfx::PlatformFont::CreateDefault()); | |
| 118 prefs->default_font_size = default_font->GetFontSize(); | |
| 119 #endif // OS_LINUX | |
| 120 #endif | 113 #endif |
| 121 | 114 |
| 122 #if !defined(OS_MACOSX) | 115 #if !defined(OS_MACOSX) |
| 123 prefs->plugin_fullscreen_allowed = | 116 prefs->plugin_fullscreen_allowed = |
| 124 pref_service->GetBoolean(prefs::kFullscreenAllowed); | 117 pref_service->GetBoolean(prefs::kFullscreenAllowed); |
| 125 #endif | 118 #endif |
| 126 } | 119 } |
| 127 | 120 |
| 128 } // namespace renderer_preferences_util | 121 } // namespace renderer_preferences_util |
| OLD | NEW |