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_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_
10 #include "base/macros.h"
11 #include "chrome/browser/extensions/chrome_extension_function_details.h"
12 #include "extensions/browser/extension_function.h"
14 namespace extensions
{
16 class AutofillPrivateSaveAddressFunction
: public UIThreadExtensionFunction
{
18 AutofillPrivateSaveAddressFunction();
19 DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveAddress",
20 AUTOFILLPRIVATE_SAVEADDRESS
);
23 ~AutofillPrivateSaveAddressFunction() override
;
25 // ExtensionFunction overrides.
26 ResponseAction
Run() override
;
29 ChromeExtensionFunctionDetails chrome_details_
;
31 DISALLOW_COPY_AND_ASSIGN(AutofillPrivateSaveAddressFunction
);
34 class AutofillPrivateGetAddressComponentsFunction
:
35 public UIThreadExtensionFunction
{
37 AutofillPrivateGetAddressComponentsFunction() {}
38 DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAddressComponents",
39 AUTOFILLPRIVATE_GETADDRESSCOMPONENTS
);
42 ~AutofillPrivateGetAddressComponentsFunction() override
;
44 // ExtensionFunction overrides.
45 ResponseAction
Run() override
;
48 DISALLOW_COPY_AND_ASSIGN(AutofillPrivateGetAddressComponentsFunction
);
51 class AutofillPrivateSaveCreditCardFunction
: public UIThreadExtensionFunction
{
53 AutofillPrivateSaveCreditCardFunction();
54 DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveCreditCard",
55 AUTOFILLPRIVATE_SAVECREDITCARD
);
58 ~AutofillPrivateSaveCreditCardFunction() override
;
60 // ExtensionFunction overrides.
61 ResponseAction
Run() override
;
64 ChromeExtensionFunctionDetails chrome_details_
;
66 DISALLOW_COPY_AND_ASSIGN(AutofillPrivateSaveCreditCardFunction
);
69 class AutofillPrivateRemoveEntryFunction
: public UIThreadExtensionFunction
{
71 AutofillPrivateRemoveEntryFunction();
72 DECLARE_EXTENSION_FUNCTION("autofillPrivate.removeEntry",
73 AUTOFILLPRIVATE_REMOVEENTRY
);
76 ~AutofillPrivateRemoveEntryFunction() override
;
78 // ExtensionFunction overrides.
79 ResponseAction
Run() override
;
82 ChromeExtensionFunctionDetails chrome_details_
;
84 DISALLOW_COPY_AND_ASSIGN(AutofillPrivateRemoveEntryFunction
);
87 class AutofillPrivateValidatePhoneNumbersFunction
:
88 public UIThreadExtensionFunction
{
90 AutofillPrivateValidatePhoneNumbersFunction() {}
91 DECLARE_EXTENSION_FUNCTION("autofillPrivate.validatePhoneNumbers",
92 AUTOFILLPRIVATE_VALIDATEPHONENUMBERS
);
95 ~AutofillPrivateValidatePhoneNumbersFunction() override
;
97 // ExtensionFunction overrides.
98 ResponseAction
Run() override
;
101 DISALLOW_COPY_AND_ASSIGN(AutofillPrivateValidatePhoneNumbersFunction
);
104 class AutofillPrivateMaskCreditCardFunction
: public UIThreadExtensionFunction
{
106 AutofillPrivateMaskCreditCardFunction();
107 DECLARE_EXTENSION_FUNCTION("autofillPrivate.maskCreditCard",
108 AUTOFILLPRIVATE_MASKCREDITCARD
);
111 ~AutofillPrivateMaskCreditCardFunction() override
;
113 // ExtensionFunction overrides.
114 ResponseAction
Run() override
;
117 ChromeExtensionFunctionDetails chrome_details_
;
119 DISALLOW_COPY_AND_ASSIGN(AutofillPrivateMaskCreditCardFunction
);
122 } // namespace extensions
124 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_