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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
6 #define CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
8 #include "base/macros.h"
9 #include "chrome/browser/ssl/ssl_client_auth_observer.h"
10 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
11 #include "chrome/browser/ui/views/certificate_selector.h"
13 // This header file exists only for testing. Chrome should access the
14 // certificate selector only through the cross-platform interface
15 // chrome/browser/ssl_client_certificate_selector.h.
22 class SSLCertRequestInfo
;
23 class X509Certificate
;
26 class SSLClientCertificateSelector
: public chrome::CertificateSelector
,
27 public SSLClientAuthObserver
{
29 SSLClientCertificateSelector(
30 content::WebContents
* web_contents
,
31 const scoped_refptr
<net::SSLCertRequestInfo
>& cert_request_info
,
32 scoped_ptr
<content::ClientCertificateDelegate
> delegate
);
33 ~SSLClientCertificateSelector() override
;
37 // SSLClientAuthObserver:
38 void OnCertSelectedByNotification() override
;
40 // chrome::CertificateSelector:
41 bool Cancel() override
;
42 bool Accept() override
;
43 bool Close() override
;
46 // Callback after unlocking certificate slot.
47 void Unlocked(net::X509Certificate
* cert
);
49 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelector
);
52 #endif // CHROME_BROWSER_UI_VIEWS_SSL_CLIENT_CERTIFICATE_SELECTOR_H_