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 13 matching lines...) Expand all Loading... |
24 class X509Certificate; | 24 class X509Certificate; |
25 } | 25 } |
26 | 26 |
27 class SSLClientCertificateSelector : public chrome::CertificateSelector, | 27 class SSLClientCertificateSelector : public chrome::CertificateSelector, |
28 public SSLClientAuthObserver, | 28 public SSLClientAuthObserver, |
29 public content::WebContentsObserver { | 29 public content::WebContentsObserver { |
30 public: | 30 public: |
31 SSLClientCertificateSelector( | 31 SSLClientCertificateSelector( |
32 content::WebContents* web_contents, | 32 content::WebContents* web_contents, |
33 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info, | 33 const scoped_refptr<net::SSLCertRequestInfo>& cert_request_info, |
34 net::CertificateList client_certs, | 34 net::ClientCertIdentityList client_certs, |
35 std::unique_ptr<content::ClientCertificateDelegate> delegate); | 35 std::unique_ptr<content::ClientCertificateDelegate> delegate); |
36 ~SSLClientCertificateSelector() override; | 36 ~SSLClientCertificateSelector() override; |
37 | 37 |
38 void Init(); | 38 void Init(); |
39 | 39 |
40 // SSLClientAuthObserver: | 40 // SSLClientAuthObserver: |
41 void OnCertSelectedByNotification() override; | 41 void OnCertSelectedByNotification() override; |
42 | 42 |
43 // chrome::CertificateSelector: | 43 // chrome::CertificateSelector: |
44 void DeleteDelegate() override; | 44 void DeleteDelegate() override; |
45 bool Accept() override; | 45 bool Accept() override; |
46 | 46 |
47 // content::WebContentsObserver: | 47 // content::WebContentsObserver: |
48 void WebContentsDestroyed() override; | 48 void WebContentsDestroyed() override; |
49 | 49 |
50 private: | 50 private: |
51 // Callback after unlocking certificate slot. | 51 // Callback after retrieving private key. |
52 void Unlocked(net::X509Certificate* cert); | 52 void GotPrivateKey(net::X509Certificate* cert, |
| 53 scoped_refptr<net::SSLPrivateKey> private_key); |
53 | 54 |
54 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelector); | 55 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelector); |
55 }; | 56 }; |
56 | 57 |
57 #endif // CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ | 58 #endif // CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ |
OLD | NEW |