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 "ui/gfx/font_render_params_linux.h" | 5 #include "ui/gfx/font_render_params_linux.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 #if defined(TOOLKIT_GTK) | 9 #if defined(TOOLKIT_GTK) |
10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
11 #else | 11 #else |
12 #include <fontconfig/fontconfig.h> | 12 #include <fontconfig/fontconfig.h> |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "ui/base/ui_base_switches.h" | 14 #include "ui/gfx/switches.h" |
15 #endif | 15 #endif |
16 | 16 |
17 namespace gfx { | 17 namespace gfx { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Initializes |params| with the system's default settings. |renderer| is true | 21 // Initializes |params| with the system's default settings. |renderer| is true |
22 // when setting WebKit renderer defaults. | 22 // when setting WebKit renderer defaults. |
23 void LoadDefaults(FontRenderParams* params, bool renderer) { | 23 void LoadDefaults(FontRenderParams* params, bool renderer) { |
24 #if defined(TOOLKIT_GTK) | 24 #if defined(TOOLKIT_GTK) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 const FontRenderParams& GetDefaultWebKitFontRenderParams() { | 134 const FontRenderParams& GetDefaultWebKitFontRenderParams() { |
135 static bool loaded_defaults = false; | 135 static bool loaded_defaults = false; |
136 static FontRenderParams default_params; | 136 static FontRenderParams default_params; |
137 if (!loaded_defaults) | 137 if (!loaded_defaults) |
138 LoadDefaults(&default_params, /* renderer */ true); | 138 LoadDefaults(&default_params, /* renderer */ true); |
139 loaded_defaults = true; | 139 loaded_defaults = true; |
140 return default_params; | 140 return default_params; |
141 } | 141 } |
142 | 142 |
143 } // namespace gfx | 143 } // namespace gfx |
OLD | NEW |