ssl_client_certificate_selector.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
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.
4
5#ifndef CHROME_BROWSER_SSL_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
6#define CHROME_BROWSER_SSL_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
7
8#include "base/callback_forward.h"
9
10namespace content {
11class WebContents;
12}
13
14namespace net {
15class HttpNetworkSession;
16class SSLCertRequestInfo;
17class X509Certificate;
18}
19
20namespace chrome {
21
22// Opens a constrained SSL client certificate selection dialog under |parent|,
23// offering certificates from |cert_request_info|. When the user has made a
24// selection, the dialog will report back to |callback|. |callback| is notified
25// when the dialog closes in call cases; if the user cancels the dialog, we call
26// with a NULL certificate.
27void ShowSSLClientCertificateSelector(
28    content::WebContents* contents,
29    const net::HttpNetworkSession* network_session,
30    net::SSLCertRequestInfo* cert_request_info,
31    const base::Callback<void(net::X509Certificate*)>& callback);
32
33}  // namespace chrome
34
35#endif  // CHROME_BROWSER_SSL_SSL_CLIENT_CERTIFICATE_SELECTOR_H_
36