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_VIEWS_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" |
| 12 #include "chrome/browser/ui/platform_keys_certificate_selector_chromeos.h" |
| 13 #include "chrome/browser/ui/views/certificate_selector.h" |
| 14 #include "net/cert/x509_certificate.h" |
| 15 |
| 16 // Chrome should access this certificate selector only through the interface |
| 17 // chrome/browser/ui/platform_keys_certificate_selector_chromeos.h . |
| 18 |
| 19 namespace content { |
| 20 class WebContents; |
| 21 } |
| 22 |
| 23 namespace chromeos { |
| 24 |
| 25 // A certificate selector dialog that explains to the user that an extension |
| 26 // requests access to certificates. |
| 27 class PlatformKeysCertificateSelector : public chrome::CertificateSelector { |
| 28 public: |
| 29 PlatformKeysCertificateSelector(const net::CertificateList& certificates, |
| 30 const std::string& extension_name, |
| 31 const CertificateSelectedCallback& callback, |
| 32 content::WebContents* web_contents); |
| 33 ~PlatformKeysCertificateSelector() override; |
| 34 |
| 35 void Init(); |
| 36 |
| 37 // chrome::CertificateSelector: |
| 38 bool Cancel() override; |
| 39 bool Accept() override; |
| 40 |
| 41 private: |
| 42 const std::string extension_name_; |
| 43 const CertificateSelectedCallback callback_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(PlatformKeysCertificateSelector); |
| 46 }; |
| 47 |
| 48 } // namespace chromeos |
| 49 |
| 50 #endif // CHROME_BROWSER_UI_VIEWS_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H
_ |
OLD | NEW |