| 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 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialog); | 82 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialog); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace | 85 } // namespace |
| 86 | 86 |
| 87 void ShowCertificateViewer(content::WebContents* web_contents, | 87 void ShowCertificateViewer(content::WebContents* web_contents, |
| 88 gfx::NativeWindow parent, | 88 gfx::NativeWindow parent, |
| 89 net::X509Certificate* cert) { | 89 net::X509Certificate* cert) { |
| 90 if (chrome::GetHostDesktopTypeForNativeWindow(parent) != | 90 if (chrome::GetHostDesktopTypeForNativeWindow(parent) != |
| 91 chrome::HOST_DESKTOP_TYPE_ASH) { | 91 ui::HOST_DESKTOP_TYPE_ASH) { |
| 92 CertificateViewerDialog* dialog = new CertificateViewerDialog; | 92 CertificateViewerDialog* dialog = new CertificateViewerDialog; |
| 93 dialog->Show( | 93 dialog->Show( |
| 94 parent->GetHost()->GetAcceleratedWidget(), cert, | 94 parent->GetHost()->GetAcceleratedWidget(), cert, |
| 95 base::Bind(&base::DeletePointer<CertificateViewerDialog>, dialog)); | 95 base::Bind(&base::DeletePointer<CertificateViewerDialog>, dialog)); |
| 96 } else { | 96 } else { |
| 97 NOTIMPLEMENTED(); | 97 NOTIMPLEMENTED(); |
| 98 } | 98 } |
| 99 } | 99 } |
| OLD | NEW |