Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / extensions / api / certificate_provider / certificate_provider_api.h
blobbc4ec19752bd8f6605fc8805833953e044b7da47
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_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_API_H_
8 #include "extensions/browser/extension_function.h"
10 namespace chromeos {
11 namespace certificate_provider {
12 struct CertificateInfo;
16 namespace extensions {
18 namespace api {
19 namespace certificate_provider {
20 struct CertificateInfo;
24 class CertificateProviderInternalReportCertificatesFunction
25 : public UIThreadExtensionFunction {
26 private:
27 ~CertificateProviderInternalReportCertificatesFunction() override;
28 ResponseAction Run() override;
30 bool ParseCertificateInfo(
31 const api::certificate_provider::CertificateInfo& info,
32 chromeos::certificate_provider::CertificateInfo* out_info);
34 DECLARE_EXTENSION_FUNCTION("certificateProviderInternal.reportCertificates",
35 CERTIFICATEPROVIDERINTERNAL_REPORTCERTIFICATES);
38 class CertificateProviderInternalReportSignatureFunction
39 : public UIThreadExtensionFunction {
40 private:
41 ~CertificateProviderInternalReportSignatureFunction() override;
42 ResponseAction Run() override;
44 DECLARE_EXTENSION_FUNCTION("certificateProviderInternal.reportSignature",
45 CERTIFICATEPROVIDERINTERNAL_REPORTSIGNATURE);
48 } // namespace extensions
50 #endif // CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_API_H_