OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/base/webui/web_ui_util.h" | 5 #include "ui/base/webui/web_ui_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
134 // Vary font settings for Windows XP. | 134 // Vary font settings for Windows XP. |
135 if (base::win::GetVersion() < base::win::VERSION_VISTA) { | 135 if (base::win::GetVersion() < base::win::VERSION_VISTA) { |
136 web_font_family_id = IDS_WEB_FONT_FAMILY_XP; | 136 web_font_family_id = IDS_WEB_FONT_FAMILY_XP; |
137 web_font_size_id = IDS_WEB_FONT_SIZE_XP; | 137 web_font_size_id = IDS_WEB_FONT_SIZE_XP; |
138 } | 138 } |
139 #endif | 139 #endif |
140 | 140 |
141 std::string font_family = l10n_util::GetStringUTF8(web_font_family_id); | 141 std::string font_family = l10n_util::GetStringUTF8(web_font_family_id); |
142 | 142 |
143 #if defined(TOOLKIT_GTK) | |
Evan Stade
2014/04/14 16:36:56
why make this behavioral change?
Elliot Glaysher
2014/04/14 16:52:01
What behavioral change? This is dead code and hasn
Evan Stade
2014/04/14 18:21:20
Today was the first day I got a version of Chrome
| |
144 // Use the system font on Linux/GTK. Keep the hard-coded font families as | |
145 // backup in case for some crazy reason this one isn't available. | |
146 font_family = ui::ResourceBundle::GetSharedInstance().GetFont( | |
147 ui::ResourceBundle::BaseFont).GetFontName() + ", " + font_family; | |
148 #endif | |
149 | |
150 localized_strings->SetString("fontfamily", font_family); | 143 localized_strings->SetString("fontfamily", font_family); |
151 localized_strings->SetString("fontsize", | 144 localized_strings->SetString("fontsize", |
152 l10n_util::GetStringUTF8(web_font_size_id)); | 145 l10n_util::GetStringUTF8(web_font_size_id)); |
153 localized_strings->SetString("textdirection", | 146 localized_strings->SetString("textdirection", |
154 base::i18n::IsRTL() ? "rtl" : "ltr"); | 147 base::i18n::IsRTL() ? "rtl" : "ltr"); |
155 } | 148 } |
156 | 149 |
157 } // namespace webui | 150 } // namespace webui |
OLD | NEW |