OLD | NEW |
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" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class SSLCertRequestInfo; | 22 class SSLCertRequestInfo; |
23 class X509Certificate; | 23 class X509Certificate; |
24 } | 24 } |
25 | 25 |
26 class SSLClientCertificateSelector : public chrome::CertificateSelector, | 26 class SSLClientCertificateSelector : public chrome::CertificateSelector, |
27 public SSLClientAuthObserver { | 27 public SSLClientAuthObserver { |
28 public: | 28 public: |
29 SSLClientCertificateSelector( | 29 SSLClientCertificateSelector( |
30 content::WebContents* web_contents, | 30 content::WebContents* web_contents, |
31 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info, | 31 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info, |
32 scoped_ptr<content::ClientCertificateDelegate> delegate); | 32 std::unique_ptr<content::ClientCertificateDelegate> delegate); |
33 ~SSLClientCertificateSelector() override; | 33 ~SSLClientCertificateSelector() override; |
34 | 34 |
35 void Init(); | 35 void Init(); |
36 | 36 |
37 // SSLClientAuthObserver: | 37 // SSLClientAuthObserver: |
38 void OnCertSelectedByNotification() override; | 38 void OnCertSelectedByNotification() override; |
39 | 39 |
40 // chrome::CertificateSelector: | 40 // chrome::CertificateSelector: |
41 bool Cancel() override; | 41 bool Cancel() override; |
42 bool Accept() override; | 42 bool Accept() override; |
43 bool Close() override; | 43 bool Close() override; |
44 | 44 |
45 private: | 45 private: |
46 // Callback after unlocking certificate slot. | 46 // Callback after unlocking certificate slot. |
47 void Unlocked(net::X509Certificate* cert); | 47 void Unlocked(net::X509Certificate* cert); |
48 | 48 |
49 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelector); | 49 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelector); |
50 }; | 50 }; |
51 | 51 |
52 #endif // CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ | 52 #endif // CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ |
OLD | NEW |