Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1723)

Unified Diff: chrome/browser/ui/webui/settings_utils.h

Issue 2927273002: Move code for old, deprecated Options UI to only ChromeOS (Closed)
Patch Set: check_gn_headers Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings_utils.h
diff --git a/chrome/browser/ui/webui/settings_utils.h b/chrome/browser/ui/webui/settings_utils.h
index c32310e6800323b012a05ef57885d0a8c7ec976b..d0f82b4a1fa553995ed4a0492cb83fcbe25708e1 100644
--- a/chrome/browser/ui/webui/settings_utils.h
+++ b/chrome/browser/ui/webui/settings_utils.h
@@ -11,6 +11,7 @@
#include "ui/base/resource/scale_factor.h"
class GURL;
+class PrefService;
namespace base {
class RefCountedMemory;
@@ -20,6 +21,7 @@ namespace content {
class WebContents;
}
+// Chrome settings utility methods.
namespace settings_utils {
// Invoke UI for network proxy settings.
@@ -35,6 +37,23 @@ bool FixupAndValidateStartupPage(const std::string& url_string,
base::RefCountedMemory* GetFaviconResourceBytes(ui::ScaleFactor scale_factor);
+#if defined(OS_MACOSX)
+void ValidateSavedFonts(PrefService* prefs);
+#endif
+
+// When |font_name_or_list| starts with ",", it is a list of font names
+// separated by "," and this function returns the first available font name.
+// Otherwise returns |font_name_or_list| as is.
+// Unlike gfx::FontList, this function picks one font, and character-level
+// fallback is handled in CSS.
+std::string ResolveFontList(const std::string& font_name_or_list);
+
+// Returns the localized name of a font so that settings can find it within
+// the list of system fonts. On Windows, the list of system fonts has names
+// only for the system locale, but the pref value may be in the English name.
+// For example, "MS Gothic" becomes "MS ゴシック" on localized Windows.
+std::string MaybeGetLocalizedFontName(const std::string& font_name_or_list);
+
} // namespace settings_utils
#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698