Infobar material design refresh: layout
[chromium-blink-merge.git] / chrome / browser / ui / views / platform_keys_certificate_selector_chromeos.h
blobc70575abdca56b59d7ada444c78e2713ff883084
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_VIEWS_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_VIEWS_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
8 #include <string>
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"
16 // Chrome should access this certificate selector only through the interface
17 // chrome/browser/ui/platform_keys_certificate_selector_chromeos.h .
19 namespace content {
20 class WebContents;
23 namespace chromeos {
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 // |callback| must not be null.
30 PlatformKeysCertificateSelector(const net::CertificateList& certificates,
31 const std::string& extension_name,
32 const CertificateSelectedCallback& callback,
33 content::WebContents* web_contents);
34 ~PlatformKeysCertificateSelector() override;
36 void Init();
38 // chrome::CertificateSelector:
39 bool Cancel() override;
40 bool Accept() override;
42 private:
43 const std::string extension_name_;
45 // Will be reset to null after it was run.
46 CertificateSelectedCallback callback_;
48 DISALLOW_COPY_AND_ASSIGN(PlatformKeysCertificateSelector);
51 } // namespace chromeos
53 #endif // CHROME_BROWSER_UI_VIEWS_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_