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

Unified Diff: chrome/browser/ui/webui/settings_utils_win.cc

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_win.cc
diff --git a/chrome/browser/ui/webui/settings_utils_win.cc b/chrome/browser/ui/webui/settings_utils_win.cc
index 8380d43ef0e85f55244000cf967a8bf312611f47..b9ed44feb528708e4b61a28c642fd730b6adc475 100644
--- a/chrome/browser/ui/webui/settings_utils_win.cc
+++ b/chrome/browser/ui/webui/settings_utils_win.cc
@@ -19,6 +19,8 @@
#include "chrome/browser/browser_process.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
+#include "ui/gfx/font.h"
+#include "ui/gfx/platform_font_win.h"
#include "ui/shell_dialogs/base_shell_dialog_win.h"
#include "ui/views/win/hwnd_util.h"
@@ -112,4 +114,13 @@ void ShowManageSSLCertificates(content::WebContents* web_contents) {
base::Bind(&base::DeletePointer<ManageCertificatesDialog>, dialog));
}
+std::string MaybeGetLocalizedFontName(const std::string& font_name_or_list) {
+ std::string font_name = ResolveFontList(font_name_or_list);
+ if (font_name.empty())
+ return font_name;
+ gfx::Font font(font_name, 12); // dummy font size
+ return static_cast<gfx::PlatformFontWin*>(font.platform_font())
+ ->GetLocalizedFontName();
+}
+
} // namespace settings_utils

Powered by Google App Engine
This is Rietveld 408576698