Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_UTILS_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_UTILS_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_UTILS_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 | 11 |
| 10 class PrefService; | 12 class PrefService; |
| 11 | 13 |
| 12 namespace options { | 14 namespace options { |
| 13 | 15 |
| 14 // Chrome advanced options utility methods. | 16 // Chrome advanced options utility methods. |
| 15 class FontSettingsUtilities { | 17 class FontSettingsUtilities { |
| 16 public: | 18 public: |
| 17 static void ValidateSavedFonts(PrefService* prefs); | 19 static void ValidateSavedFonts(PrefService* prefs); |
| 18 | 20 |
| 21 // Returns the first available font if it starts with ",". | |
|
msw
2016/10/27 00:04:18
This doesn't actually return a font, can you clari
kojii
2016/10/27 04:50:56
Clarified. This function returns the specified nam
| |
| 22 // Unlike gfx::FontList, this function picks one font, and character-level | |
| 23 // fallback is handled in CSS. | |
| 24 static std::string ResolveFontList(const std::string&); | |
|
msw
2016/10/27 00:04:18
nit: add param names here and below.
kojii
2016/10/27 04:50:56
Done.
| |
| 25 | |
| 26 // Returns the localized name of a font so that settings can find it within | |
| 27 // the list of system fonts. On Windows, the list of system fonts has names | |
| 28 // only for the system locale, but the pref value may be in the English name. | |
| 29 static std::string MaybeGetLocalizedFontName(const std::string&); | |
| 30 | |
| 19 private: | 31 private: |
| 20 DISALLOW_IMPLICIT_CONSTRUCTORS(FontSettingsUtilities); | 32 DISALLOW_IMPLICIT_CONSTRUCTORS(FontSettingsUtilities); |
| 21 }; | 33 }; |
| 22 | 34 |
| 23 } // namespace options | 35 } // namespace options |
| 24 | 36 |
| 25 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_UTILS_H_ | 37 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_UTILS_H_ |
| OLD | NEW |