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

Side by Side Diff: chrome/browser/ui/views/certificate_selector.h

Issue 1207313003: Allow cert-popup for WebView guests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated to use WebContentsModalDialogManager. Created 5 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_VIEWS_CERTIFICATE_SELECTOR_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_
6 #define CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // A base class for dialogs that show a given list of certificates to the user. 28 // A base class for dialogs that show a given list of certificates to the user.
29 // The user can select a single certificate and look at details of each 29 // The user can select a single certificate and look at details of each
30 // certificate. 30 // certificate.
31 // The currently selected certificate can be obtained using |GetSelectedCert()|. 31 // The currently selected certificate can be obtained using |GetSelectedCert()|.
32 // The explanatory text shown to the user must be provided to |InitWithText()|. 32 // The explanatory text shown to the user must be provided to |InitWithText()|.
33 class CertificateSelector : public views::DialogDelegateView, 33 class CertificateSelector : public views::DialogDelegateView,
34 public views::ButtonListener, 34 public views::ButtonListener,
35 public views::TableViewObserver { 35 public views::TableViewObserver {
36 public: 36 public:
37 // Indicates if the dialog can be successfully shown.
38 static bool CanShow(content::WebContents* web_contents);
davidben 2015/07/07 16:41:23 Mind adding a TODO, so we remember to get rid of i
wjmaclean 2015/07/07 17:17:43 Done.
39
37 class CertificateTableModel; 40 class CertificateTableModel;
38 41
39 // |web_contents| must not be null. 42 // |web_contents| must not be null.
40 CertificateSelector(const net::CertificateList& certificates, 43 CertificateSelector(const net::CertificateList& certificates,
41 content::WebContents* web_contents); 44 content::WebContents* web_contents);
42 ~CertificateSelector() override; 45 ~CertificateSelector() override;
43 46
44 // Returns the currently selected certificate or null if none is selected. 47 // Returns the currently selected certificate or null if none is selected.
45 // Must be called after |InitWithText()|. 48 // Must be called after |InitWithText()|.
46 net::X509Certificate* GetSelectedCert() const; 49 net::X509Certificate* GetSelectedCert() const;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 86
84 views::TableView* table_; 87 views::TableView* table_;
85 views::LabelButton* view_cert_button_; 88 views::LabelButton* view_cert_button_;
86 89
87 DISALLOW_COPY_AND_ASSIGN(CertificateSelector); 90 DISALLOW_COPY_AND_ASSIGN(CertificateSelector);
88 }; 91 };
89 92
90 } // namespace chrome 93 } // namespace chrome
91 94
92 #endif // CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_ 95 #endif // CHROME_BROWSER_UI_VIEWS_CERTIFICATE_SELECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698