Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h

Issue 2094333002: Implementation for chrome.certificateProvider.requestPin/stopPinRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fix Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_
7 7
8 #include "extensions/browser/extension_function.h" 8 #include "extensions/browser/extension_function.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
(...skipping 27 matching lines...) Expand all
38 class CertificateProviderInternalReportSignatureFunction 38 class CertificateProviderInternalReportSignatureFunction
39 : public UIThreadExtensionFunction { 39 : public UIThreadExtensionFunction {
40 private: 40 private:
41 ~CertificateProviderInternalReportSignatureFunction() override; 41 ~CertificateProviderInternalReportSignatureFunction() override;
42 ResponseAction Run() override; 42 ResponseAction Run() override;
43 43
44 DECLARE_EXTENSION_FUNCTION("certificateProviderInternal.reportSignature", 44 DECLARE_EXTENSION_FUNCTION("certificateProviderInternal.reportSignature",
45 CERTIFICATEPROVIDERINTERNAL_REPORTSIGNATURE); 45 CERTIFICATEPROVIDERINTERNAL_REPORTSIGNATURE);
46 }; 46 };
47 47
48 // The maximum number of times per minute, extension is allowed to show PIN
49 // dialog again after user closed the previous one.
50 extern const int MAX_CLOSED_DIALOGS_PER_10_MINUTES;
51
52 class CertificateProviderShowPinDialogFunction
53 : public UIThreadExtensionFunction {
54 private:
55 ~CertificateProviderShowPinDialogFunction() override;
56 ResponseAction Run() override;
57 bool ShouldSkipQuotaLimiting() const override;
58 void GetQuotaLimitHeuristics(
59 extensions::QuotaLimitHeuristics* heuristics) const override;
60 void OnInputReceived(const base::string16& value);
61
62 DECLARE_EXTENSION_FUNCTION("certificateProvider.showPinDialog",
63 CERTIFICATEPROVIDER_SHOWPINDIALOG);
64 };
65
66 class CertificateProviderClosePinDialogFunction
67 : public UIThreadExtensionFunction {
68 private:
69 ~CertificateProviderClosePinDialogFunction() override;
70 ResponseAction Run() override;
71
72 DECLARE_EXTENSION_FUNCTION("certificateProvider.closePinDialog",
73 CERTIFICATEPROVIDER_CLOSEPINDIALOG);
74 };
75
48 } // namespace extensions 76 } // namespace extensions
49 77
50 #endif // CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVID ER_API_H_ 78 #endif // CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVID ER_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698