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 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" | 5 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 27 matching lines...) Expand all Loading... |
38 enum { | 38 enum { |
39 RESPONSE_SHOW_CERT_INFO = 1, | 39 RESPONSE_SHOW_CERT_INFO = 1, |
40 }; | 40 }; |
41 | 41 |
42 /////////////////////////////////////////////////////////////////////////////// | 42 /////////////////////////////////////////////////////////////////////////////// |
43 // SSLClientCertificateSelector | 43 // SSLClientCertificateSelector |
44 | 44 |
45 class SSLClientCertificateSelector : public SSLClientAuthObserver, | 45 class SSLClientCertificateSelector : public SSLClientAuthObserver, |
46 public ConstrainedWindowGtkDelegate { | 46 public ConstrainedWindowGtkDelegate { |
47 public: | 47 public: |
48 explicit SSLClientCertificateSelector( | 48 SSLClientCertificateSelector( |
49 WebContents* parent, | 49 WebContents* parent, |
50 const net::HttpNetworkSession* network_session, | 50 const net::HttpNetworkSession* network_session, |
51 net::SSLCertRequestInfo* cert_request_info, | 51 net::SSLCertRequestInfo* cert_request_info, |
52 const base::Callback<void(net::X509Certificate*)>& callback); | 52 const base::Callback<void(net::X509Certificate*)>& callback); |
53 ~SSLClientCertificateSelector(); | 53 ~SSLClientCertificateSelector(); |
54 | 54 |
55 void Show(); | 55 void Show(); |
56 | 56 |
57 // SSLClientAuthObserver implementation: | 57 // SSLClientAuthObserver implementation: |
58 virtual void OnCertSelectedByNotification(); | 58 virtual void OnCertSelectedByNotification(); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 content::WebContents* contents, | 388 content::WebContents* contents, |
389 const net::HttpNetworkSession* network_session, | 389 const net::HttpNetworkSession* network_session, |
390 net::SSLCertRequestInfo* cert_request_info, | 390 net::SSLCertRequestInfo* cert_request_info, |
391 const base::Callback<void(net::X509Certificate*)>& callback) { | 391 const base::Callback<void(net::X509Certificate*)>& callback) { |
392 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 392 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
393 (new SSLClientCertificateSelector( | 393 (new SSLClientCertificateSelector( |
394 contents, network_session, cert_request_info, callback))->Show(); | 394 contents, network_session, cert_request_info, callback))->Show(); |
395 } | 395 } |
396 | 396 |
397 } // namespace chrome | 397 } // namespace chrome |
OLD | NEW |