OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/callback_forward.h" |
| 12 #include "base/memory/ref_counted.h" |
| 13 |
| 14 namespace content { |
| 15 class WebContents; |
| 16 } |
| 17 |
| 18 namespace net { |
| 19 class X509Certificate; |
| 20 typedef std::vector<scoped_refptr<X509Certificate>> CertificateList; |
| 21 } |
| 22 |
| 23 namespace chromeos { |
| 24 |
| 25 typedef base::Callback<void( |
| 26 const scoped_refptr<net::X509Certificate>& selected_certificate)> |
| 27 CertificateSelectedCallback; |
| 28 |
| 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 |
| 35 // argument. |
| 36 void ShowPlatformKeysCertificateSelector( |
| 37 content::WebContents* web_contents, |
| 38 const std::string& extension_id, |
| 39 const net::CertificateList& certificates, |
| 40 const CertificateSelectedCallback& callback); |
| 41 |
| 42 } // namespace chromeos |
| 43 |
| 44 #endif // CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_ |
OLD | NEW |