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

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

Issue 1978883002: In dialogs & dialog-like bubbles, make the escape button just close the prompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 (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_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
6 #define CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ 6 #define CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ssl/ssl_client_auth_observer.h" 9 #include "chrome/browser/ssl/ssl_client_auth_observer.h"
10 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" 10 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
11 #include "chrome/browser/ui/views/certificate_selector.h" 11 #include "chrome/browser/ui/views/certificate_selector.h"
12 #include "content/public/browser/web_contents_observer.h"
12 13
13 // This header file exists only for testing. Chrome should access the 14 // This header file exists only for testing. Chrome should access the
14 // certificate selector only through the cross-platform interface 15 // certificate selector only through the cross-platform interface
15 // chrome/browser/ssl_client_certificate_selector.h. 16 // chrome/browser/ssl_client_certificate_selector.h.
16 17
17 namespace content { 18 namespace content {
18 class WebContents; 19 class WebContents;
19 } 20 }
20 21
21 namespace net { 22 namespace net {
22 class SSLCertRequestInfo; 23 class SSLCertRequestInfo;
23 class X509Certificate; 24 class X509Certificate;
24 } 25 }
25 26
26 class SSLClientCertificateSelector : public chrome::CertificateSelector, 27 class SSLClientCertificateSelector : public chrome::CertificateSelector,
27 public SSLClientAuthObserver { 28 public SSLClientAuthObserver,
29 public content::WebContentsObserver {
28 public: 30 public:
29 SSLClientCertificateSelector( 31 SSLClientCertificateSelector(
30 content::WebContents* web_contents, 32 content::WebContents* web_contents,
31 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info, 33 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info,
32 std::unique_ptr<content::ClientCertificateDelegate> delegate); 34 std::unique_ptr<content::ClientCertificateDelegate> delegate);
33 ~SSLClientCertificateSelector() override; 35 ~SSLClientCertificateSelector() override;
34 36
35 void Init(); 37 void Init();
36 38
37 // SSLClientAuthObserver: 39 // SSLClientAuthObserver:
38 void OnCertSelectedByNotification() override; 40 void OnCertSelectedByNotification() override;
39 41
40 // chrome::CertificateSelector: 42 // chrome::CertificateSelector:
41 bool Cancel() override; 43 void DeleteDelegate() override;
42 bool Accept() override; 44 bool Accept() override;
43 bool Close() override; 45
46 // content::WebContentsObserver:
47 void WebContentsDestroyed() override;
44 48
45 private: 49 private:
46 // Callback after unlocking certificate slot. 50 // Callback after unlocking certificate slot.
47 void Unlocked(net::X509Certificate* cert); 51 void Unlocked(net::X509Certificate* cert);
48 52
49 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelector); 53 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelector);
50 }; 54 };
51 55
52 #endif // CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ 56 #endif // CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc ('k') | chrome/browser/ui/views/ssl_client_certificate_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698