| 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 #include "chrome/browser/ui/webui/options2/advanced_options_utils.h" | 5 #include "chrome/browser/ui/webui/options2/advanced_options_utils.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <cryptuiapi.h> | 8 #include <cryptuiapi.h> |
| 9 #pragma comment(lib, "cryptui.lib") | 9 #pragma comment(lib, "cryptui.lib") |
| 10 #include <shellapi.h> | 10 #include <shellapi.h> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 19 #include "content/public/browser/web_contents_view.h" | 19 #include "content/public/browser/web_contents_view.h" |
| 20 | 20 |
| 21 using content::BrowserThread; | 21 using content::BrowserThread; |
| 22 using content::WebContents; | 22 using content::WebContents; |
| 23 | 23 |
| 24 namespace options2 { | 24 namespace options { |
| 25 | 25 |
| 26 // Callback that opens the Internet Options control panel dialog with the | 26 // Callback that opens the Internet Options control panel dialog with the |
| 27 // Connections tab selected. | 27 // Connections tab selected. |
| 28 void OpenConnectionDialogCallback() { | 28 void OpenConnectionDialogCallback() { |
| 29 // Using rundll32 seems better than LaunchConnectionDialog which causes a | 29 // Using rundll32 seems better than LaunchConnectionDialog which causes a |
| 30 // new dialog to be made for each call. rundll32 uses the same global | 30 // new dialog to be made for each call. rundll32 uses the same global |
| 31 // dialog and it seems to share with the shortcut in control panel. | 31 // dialog and it seems to share with the shortcut in control panel. |
| 32 FilePath rundll32; | 32 FilePath rundll32; |
| 33 PathService::Get(base::DIR_SYSTEM, &rundll32); | 33 PathService::Get(base::DIR_SYSTEM, &rundll32); |
| 34 rundll32 = rundll32.AppendASCII("rundll32.exe"); | 34 rundll32 = rundll32.AppendASCII("rundll32.exe"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 63 cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); | 63 cert_mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT); |
| 64 cert_mgr.hwndParent = | 64 cert_mgr.hwndParent = |
| 65 #if defined(USE_AURA) | 65 #if defined(USE_AURA) |
| 66 NULL; | 66 NULL; |
| 67 #else | 67 #else |
| 68 web_contents->GetView()->GetTopLevelNativeWindow(); | 68 web_contents->GetView()->GetTopLevelNativeWindow(); |
| 69 #endif | 69 #endif |
| 70 ::CryptUIDlgCertMgr(&cert_mgr); | 70 ::CryptUIDlgCertMgr(&cert_mgr); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace options2 | 73 } // namespace options |
| OLD | NEW |