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