Chromium Code Reviews| Index: chrome/browser/ui/webui/options/advanced_options_utils_win.cc |
| diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc |
| index 39e47512f9593eab4b7faeebe6512b280e1a747d..448b75c11aea10e1d598e06c5ff3738de036cf07 100644 |
| --- a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc |
| +++ b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc |
| @@ -16,6 +16,7 @@ |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_contents_view.h" |
| +#include "ui/views/win/hwnd_util.h" |
| using content::BrowserThread; |
| using content::WebContents; |
| @@ -60,11 +61,12 @@ void AdvancedOptionsUtilities::ShowManageSSLCertificates( |
| WebContents* web_contents) { |
| CRYPTUI_CERT_MGR_STRUCT cert_mgr = { 0 }; |
| cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); |
| - cert_mgr.hwndParent = |
| + gfx::NativeWindow top_level_window = |
| + web_contents->GetView()->GetTopLevelNativeWindow(); |
| #if defined(USE_AURA) |
|
sky
2013/09/16 16:59:29
Can you use views::HWNDForNativeView to avoid the
scottmg
2013/09/16 17:26:38
Oops, didn't realize those were implemented for no
|
| - NULL; |
| + cert_mgr.hwndParent = views::HWNDForNativeWindow(top_level_window); |
| #else |
| - web_contents->GetView()->GetTopLevelNativeWindow(); |
| + cert_mgr.hwndParent = top_level_window; |
| #endif |
| ::CryptUIDlgCertMgr(&cert_mgr); |
| } |