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

Unified Diff: chrome/browser/extensions/api/autofill_private/autofill_private_api.h

Issue 1099313003: Add the IDL and stub implementation for the chrome.autofillPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kalman comments. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/autofill_private/autofill_private_api.h
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_private_api.h b/chrome/browser/extensions/api/autofill_private/autofill_private_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..97449a6ca96a067d6c9c7e41c8895e4dd07a6296
--- /dev/null
+++ b/chrome/browser/extensions/api/autofill_private/autofill_private_api.h
@@ -0,0 +1,117 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_
+#define CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
Dan Beam 2015/04/23 20:49:13 why are values.h and scoped_ptr.h needed?
Kyle Horimoto 2015/04/23 22:00:26 Removed.
+#include "extensions/browser/extension_function.h"
+
+namespace extensions {
+
+class AutofillPrivateSaveAddressFunction : public UIThreadExtensionFunction {
+ public:
+ AutofillPrivateSaveAddressFunction() {}
+ DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveAddress",
+ AUTOFILLPRIVATE_SAVEADDRESS);
+
+ protected:
+ ~AutofillPrivateSaveAddressFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutofillPrivateSaveAddressFunction);
+};
+
+class AutofillPrivateGetAddressComponentsFunction :
+ public UIThreadExtensionFunction {
+ public:
+ AutofillPrivateGetAddressComponentsFunction() {}
+ DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAddressComponents",
+ AUTOFILLPRIVATE_GETADDRESSCOMPONENTS);
+
+ protected:
+ ~AutofillPrivateGetAddressComponentsFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutofillPrivateGetAddressComponentsFunction);
+};
+
+class AutofillPrivateSaveCreditCardFunction : public UIThreadExtensionFunction {
+ public:
+ AutofillPrivateSaveCreditCardFunction() {}
+ DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveCreditCard",
+ AUTOFILLPRIVATE_SAVECREDITCARD);
+
+ protected:
+ ~AutofillPrivateSaveCreditCardFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutofillPrivateSaveCreditCardFunction);
+};
+
+class AutofillPrivateRemoveEntryFunction : public UIThreadExtensionFunction {
+ public:
+ AutofillPrivateRemoveEntryFunction() {}
+ DECLARE_EXTENSION_FUNCTION("autofillPrivate.removeEntry",
+ AUTOFILLPRIVATE_REMOVEENTRY);
+
+ protected:
+ ~AutofillPrivateRemoveEntryFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutofillPrivateRemoveEntryFunction);
+};
+
+class AutofillPrivateValidatePhoneNumbersFunction :
+ public UIThreadExtensionFunction {
+ public:
+ AutofillPrivateValidatePhoneNumbersFunction() {}
+ DECLARE_EXTENSION_FUNCTION("autofillPrivate.validatePhoneNumbers",
+ AUTOFILLPRIVATE_VALIDATEPHONENUMBERS);
+
+ protected:
+ ~AutofillPrivateValidatePhoneNumbersFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutofillPrivateValidatePhoneNumbersFunction);
+};
+
+class AutofillPrivateMaskCreditCardFunction : public UIThreadExtensionFunction {
+ public:
+ AutofillPrivateMaskCreditCardFunction() {}
+ DECLARE_EXTENSION_FUNCTION("autofillPrivate.maskCreditCard",
+ AUTOFILLPRIVATE_MASKCREDITCARD);
+
+ protected:
+ ~AutofillPrivateMaskCreditCardFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AutofillPrivateMaskCreditCardFunction);
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_

Powered by Google App Engine
This is Rietveld 408576698