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

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: review comments 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 namespace content {
21 class WebContents;
22 }
23
20 namespace ui { 24 namespace ui {
21 class WebDialogObserver; 25 class WebDialogObserver;
22 } 26 }
23 27
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 28 // Dialog for displaying detailed certificate information. This is used in linux
30 // and chromeos builds to display detailed information in a floating dialog when 29 // 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 30 // the user clicks on "Certificate Information" from the lock icon of a web site
32 // or "View" from the Certificate Manager. 31 // or "View" from the Certificate Manager.
33 class CertificateViewerDialog : private ui::WebDialogDelegate { 32 class CertificateViewerDialog : private ui::WebDialogDelegate {
34 public: 33 public:
35 // Construct a certificate viewer for the passed in certificate. A reference 34 // Construct a certificate viewer for the passed in certificate. A reference
36 // to the certificate pointer is added for the lifetime of the certificate 35 // to the certificate pointer is added for the lifetime of the certificate
37 // viewer. 36 // viewer.
38 explicit CertificateViewerDialog(net::X509Certificate* cert); 37 explicit CertificateViewerDialog(net::X509Certificate* cert);
39 virtual ~CertificateViewerDialog(); 38 virtual ~CertificateViewerDialog();
40 39
41 // Show the dialog using the given parent window. 40 // Show the dialog using the given parent window.
42 void Show(gfx::NativeWindow parent); 41 void Show(content::WebContents* web_contents, gfx::NativeWindow parent);
43 42
44 // Add WebDialogObserver for this dialog. 43 // Add WebDialogObserver for this dialog.
45 void AddObserver(ui::WebDialogObserver* observer); 44 void AddObserver(ui::WebDialogObserver* observer);
46 45
47 // Remove WebDialogObserver for this dialog. 46 // Remove WebDialogObserver for this dialog.
48 void RemoveObserver(ui::WebDialogObserver* observer); 47 void RemoveObserver(ui::WebDialogObserver* observer);
49 48
50 private: 49 private:
51 // Overridden from ui::WebDialogDelegate: 50 // Overridden from ui::WebDialogDelegate:
52 virtual ui::ModalType GetDialogModalType() const OVERRIDE; 51 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // The dialog window. 112 // The dialog window.
114 gfx::NativeWindow window_; 113 gfx::NativeWindow window_;
115 114
116 // The certificate chain. 115 // The certificate chain.
117 net::X509Certificate::OSCertHandles cert_chain_; 116 net::X509Certificate::OSCertHandles cert_chain_;
118 117
119 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialogHandler); 118 DISALLOW_COPY_AND_ASSIGN(CertificateViewerDialogHandler);
120 }; 119 };
121 120
122 #endif // CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_ 121 #endif // CHROME_BROWSER_UI_WEBUI_CERTIFICATE_VIEWER_WEBUI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/stubs_aura.cc ('k') | chrome/browser/ui/webui/certificate_viewer_webui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698