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

Side by Side 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/ui/webui/settings_utils.h" 5 #include "chrome/browser/ui/webui/settings_utils.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <cryptuiapi.h> 8 #include <cryptuiapi.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
17 #include "base/threading/thread.h" 17 #include "base/threading/thread.h"
18 #include "base/threading/thread_task_runner_handle.h" 18 #include "base/threading/thread_task_runner_handle.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
21 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
22 #include "ui/gfx/font.h"
23 #include "ui/gfx/platform_font_win.h"
22 #include "ui/shell_dialogs/base_shell_dialog_win.h" 24 #include "ui/shell_dialogs/base_shell_dialog_win.h"
23 #include "ui/views/win/hwnd_util.h" 25 #include "ui/views/win/hwnd_util.h"
24 26
25 using content::BrowserThread; 27 using content::BrowserThread;
26 28
27 namespace settings_utils { 29 namespace settings_utils {
28 30
29 namespace { 31 namespace {
30 32
31 // Shows a Windows certificate management dialog on the dialog thread. 33 // Shows a Windows certificate management dialog on the dialog thread.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void ShowManageSSLCertificates(content::WebContents* web_contents) { 107 void ShowManageSSLCertificates(content::WebContents* web_contents) {
106 HWND parent = 108 HWND parent =
107 views::HWNDForNativeWindow(web_contents->GetTopLevelNativeWindow()); 109 views::HWNDForNativeWindow(web_contents->GetTopLevelNativeWindow());
108 110
109 ManageCertificatesDialog* dialog = new ManageCertificatesDialog; 111 ManageCertificatesDialog* dialog = new ManageCertificatesDialog;
110 dialog->Show( 112 dialog->Show(
111 parent, 113 parent,
112 base::Bind(&base::DeletePointer<ManageCertificatesDialog>, dialog)); 114 base::Bind(&base::DeletePointer<ManageCertificatesDialog>, dialog));
113 } 115 }
114 116
117 std::string MaybeGetLocalizedFontName(const std::string& font_name_or_list) {
118 std::string font_name = ResolveFontList(font_name_or_list);
119 if (font_name.empty())
120 return font_name;
121 gfx::Font font(font_name, 12); // dummy font size
122 return static_cast<gfx::PlatformFontWin*>(font.platform_font())
123 ->GetLocalizedFontName();
124 }
125
115 } // namespace settings_utils 126 } // namespace settings_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698