OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/certificate_viewer.h" | 5 #include "chrome/browser/certificate_viewer.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 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "net/cert/x509_certificate.h" | 13 #include "net/cert/x509_certificate.h" |
14 | 14 |
15 #if defined(USE_AURA) | 15 #if defined(USE_AURA) |
16 #include "chrome/browser/ui/host_desktop.h" | 16 #include "chrome/browser/ui/host_desktop.h" |
17 #include "ui/aura/root_window.h" | |
18 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
| 18 #include "ui/aura/window_event_dispatcher.h" |
19 #endif | 19 #endif |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 void ShowCertificateViewerImpl(content::WebContents* web_contents, | 23 void ShowCertificateViewerImpl(content::WebContents* web_contents, |
24 HWND parent, | 24 HWND parent, |
25 net::X509Certificate* cert) { | 25 net::X509Certificate* cert) { |
26 // Create a new cert context and store containing just the certificate | 26 // Create a new cert context and store containing just the certificate |
27 // and its intermediate certificates. | 27 // and its intermediate certificates. |
28 PCCERT_CONTEXT cert_list = cert->CreateOSCertChainForCert(); | 28 PCCERT_CONTEXT cert_list = cert->CreateOSCertChainForCert(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 NOTIMPLEMENTED(); | 68 NOTIMPLEMENTED(); |
69 } | 69 } |
70 } | 70 } |
71 #else | 71 #else |
72 void ShowCertificateViewer(content::WebContents* web_contents, | 72 void ShowCertificateViewer(content::WebContents* web_contents, |
73 gfx::NativeWindow parent, | 73 gfx::NativeWindow parent, |
74 net::X509Certificate* cert) { | 74 net::X509Certificate* cert) { |
75 ShowCertificateViewerImpl(web_contents, parent, cert); | 75 ShowCertificateViewerImpl(web_contents, parent, cert); |
76 } | 76 } |
77 #endif | 77 #endif |
OLD | NEW |