1 // Copyright 2015 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_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
11 #include "base/callback_forward.h"
12 #include "base/memory/ref_counted.h"
19 class X509Certificate
;
20 typedef std::vector
<scoped_refptr
<X509Certificate
>> CertificateList
;
25 typedef base::Callback
<void(
26 const scoped_refptr
<net::X509Certificate
>& selected_certificate
)>
27 CertificateSelectedCallback
;
29 // Opens a constrained client certificate selection dialog associated with
30 // |web_contents|, offering |certificates| to the user and explaining that the
31 // selection will grant access to the extension with |extension_id|.
32 // When the user has made a selection, the dialog will report back to
33 // |callback|. |callback| is notified when the dialog closes in call cases; if
34 // the user cancels the dialog, |callback| will be called with a nullptr
36 void ShowPlatformKeysCertificateSelector(
37 content::WebContents
* web_contents
,
38 const std::string
& extension_id
,
39 const net::CertificateList
& certificates
,
40 const CertificateSelectedCallback
& callback
);
42 } // namespace chromeos
44 #endif // CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_