Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: chrome/browser/ui/webui/certificate_viewer_webui.h

Issue 10554010: Remove BrowserList::GetLastActive usage from WebUI pages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_
6 #define CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "content/public/browser/web_ui_message_handler.h" 15 #include "content/public/browser/web_ui_message_handler.h"
16 #include "net/base/x509_certificate.h" 16 #include "net/base/x509_certificate.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 #include "ui/web_dialogs/web_dialog_delegate.h" 18 #include "ui/web_dialogs/web_dialog_delegate.h"
19 19
20 class TabContents;
21
20 namespace ui { 22 namespace ui {
21 class WebDialogObserver; 23 class WebDialogObserver;
22 } 24 }
23 25
24 // Displays the native or WebUI certificate viewer dialog for the given
25 // certificate.
26 void ShowCertificateViewer(gfx::NativeWindow parent,
27 net::X509Certificate*);
28
29 // Dialog for displaying detailed certificate information. This is used in linux 26 // Dialog for displaying detailed certificate information. This is used in linux
30 // and chromeos builds to display detailed information in a floating dialog when 27 // and chromeos builds to display detailed information in a floating dialog when
31 // the user clicks on "Certificate Information" from the lock icon of a web site 28 // the user clicks on "Certificate Information" from the lock icon of a web site
32 // or "View" from the Certificate Manager. 29 // or "View" from the Certificate Manager.
33 class CertificateViewerDialog : private ui::WebDialogDelegate { 30 class CertificateViewerDialog : private ui::WebDialogDelegate {
34 public: 31 public:
35 // Construct a certificate viewer for the passed in certificate. A reference 32 // Construct a certificate viewer for the passed in certificate. A reference
36 // to the certificate pointer is added for the lifetime of the certificate 33 // to the certificate pointer is added for the lifetime of the certificate
37 // viewer. 34 // viewer.
38 explicit CertificateViewerDialog(net::X509Certificate* cert); 35 explicit CertificateViewerDialog(net::X509Certificate* cert);
39 virtual ~CertificateViewerDialog(); 36 virtual ~CertificateViewerDialog();
40 37
41 // Show the dialog using the given parent window. 38 // Show the dialog using the given parent window.
42 void Show(gfx::NativeWindow parent); 39 void Show(TabContents* tab, gfx::NativeWindow parent);
43 40
44 // Add WebDialogObserver for this dialog. 41 // Add WebDialogObserver for this dialog.
45 void AddObserver(ui::WebDialogObserver* observer); 42 void AddObserver(ui::WebDialogObserver* observer);
46 43
47 // Remove WebDialogObserver for this dialog. 44 // Remove WebDialogObserver for this dialog.
48 void RemoveObserver(ui::WebDialogObserver* observer); 45 void RemoveObserver(ui::WebDialogObserver* observer);
49 46
50 private: 47 private:
51 // Overridden from ui::WebDialogDelegate: 48 // Overridden from ui::WebDialogDelegate:
52 virtual ui::ModalType GetDialogModalType() const OVERRIDE; 49 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // The dialog window. 110 // The dialog window.
114 gfx::NativeWindow window_; 111 gfx::NativeWindow window_;
115 112
116 // The certificate chain. 113 // The certificate chain.
117 net::X509Certificate::OSCertHandles cert_chain_; 114 net::X509Certificate::OSCertHandles cert_chain_;
118 115
119 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialogHandler); 116 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialogHandler);
120 }; 117 };
121 118
122 #endif // CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_ 119 #endif // CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698