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 #ifndef CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 9 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
10 #include "net/base/x509_certificate.h" | 10 #include "net/base/x509_certificate.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 net::X509Certificate* cert); | 25 net::X509Certificate* cert); |
26 | 26 |
27 private: | 27 private: |
28 // Construct a certificate viewer for the passed in certificate. A reference | 28 // Construct a certificate viewer for the passed in certificate. A reference |
29 // to the certificate pointer is added for the lifetime of the certificate | 29 // to the certificate pointer is added for the lifetime of the certificate |
30 // viewer. | 30 // viewer. |
31 explicit CertificateViewerDialog(net::X509Certificate* cert); | 31 explicit CertificateViewerDialog(net::X509Certificate* cert); |
32 | 32 |
33 // Overridden from HtmlDialogUI::Delegate: | 33 // Overridden from HtmlDialogUI::Delegate: |
34 virtual bool IsDialogModal() const OVERRIDE; | 34 virtual bool IsDialogModal() const OVERRIDE; |
35 virtual std::wstring GetDialogTitle() const OVERRIDE; | 35 virtual string16 GetDialogTitle() const OVERRIDE; |
36 virtual GURL GetDialogContentURL() const OVERRIDE; | 36 virtual GURL GetDialogContentURL() const OVERRIDE; |
37 virtual void GetWebUIMessageHandlers( | 37 virtual void GetWebUIMessageHandlers( |
38 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; | 38 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; |
39 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 39 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; |
40 virtual std::string GetDialogArgs() const OVERRIDE; | 40 virtual std::string GetDialogArgs() const OVERRIDE; |
41 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 41 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; |
42 virtual void OnCloseContents( | 42 virtual void OnCloseContents( |
43 TabContents* source, bool* out_close_dialog) OVERRIDE; | 43 TabContents* source, bool* out_close_dialog) OVERRIDE; |
44 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 44 virtual bool ShouldShowDialogTitle() const OVERRIDE; |
45 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; | 45 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; |
46 | 46 |
47 // The certificate being viewed. | 47 // The certificate being viewed. |
48 scoped_refptr<net::X509Certificate> cert_; | 48 scoped_refptr<net::X509Certificate> cert_; |
49 | 49 |
50 // The argument string for the dialog which passes the certificate pointer. | 50 // The argument string for the dialog which passes the certificate pointer. |
51 std::string json_args_; | 51 std::string json_args_; |
52 | 52 |
53 // The title of the certificate viewer dialog, Certificate Viewer: CN. | 53 // The title of the certificate viewer dialog, Certificate Viewer: CN. |
54 std::wstring title_; | 54 string16 title_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialog); | 56 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialog); |
57 }; | 57 }; |
58 | 58 |
59 #endif // CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_H_ | 59 #endif // CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_H_ |
OLD | NEW |