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

Unified Diff: chrome/browser/extensions/api/instance_id/instance_id_api.h

Issue 1088593004: Add the IDL for chrome.instanceID API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync 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/instance_id/instance_id_api.h
diff --git a/chrome/browser/extensions/api/instance_id/instance_id_api.h b/chrome/browser/extensions/api/instance_id/instance_id_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..8ec07039342324cb5a715fb6f7560c8516c9a213
--- /dev/null
+++ b/chrome/browser/extensions/api/instance_id/instance_id_api.h
@@ -0,0 +1,83 @@
+// 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_INSTANCE_ID_INSTANCE_ID_API_H_
+#define CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_
+
+#include "extensions/browser/extension_function.h"
+
+class Profile;
+
+namespace extensions {
+
+class InstanceIDGetIDFunction : public AsyncExtensionFunction {
not at google - send to devlin 2015/04/22 17:21:42 Extend UIThreadExtensionFunction, not AsyncExtensi
jianli 2015/04/22 20:18:20 Done.
+ public:
+ DECLARE_EXTENSION_FUNCTION("InstanceID.getId", INSTANCEID_GETID);
fgorski 2015/04/22 17:34:59 getID
jianli 2015/04/22 20:18:20 Done.
+
+ InstanceIDGetIDFunction();
+
+ protected:
+ ~InstanceIDGetIDFunction() override;
+
+ // ExtensionFunction:
+ bool RunAsync() final;
+};
+
+class InstanceIDGetCreationTimeFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("InstanceID.getCreationTime",
+ INSTANCEID_GETCREATIONTIME);
+
+ InstanceIDGetCreationTimeFunction();
+
+ protected:
+ ~InstanceIDGetCreationTimeFunction() override;
+
+ // ExtensionFunction:
+ bool RunAsync() final;
+};
+
+class InstanceIDGetTokenFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("InstanceID.getToken", INSTANCEID_GETTOKEN);
+
+ InstanceIDGetTokenFunction();
+
+ protected:
+ ~InstanceIDGetTokenFunction() override;
+
+ // ExtensionFunction:
+ bool RunAsync() final;
+};
+
+class InstanceIDDeleteTokenFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("InstanceID.DeleteToken", INSTANCEID_DELETETOKEN);
+
+ InstanceIDDeleteTokenFunction();
+
+ protected:
+ ~InstanceIDDeleteTokenFunction() override;
+
+ // ExtensionFunction:
+ bool RunAsync() final;
+};
+
+class InstanceIDDeleteIDFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("InstanceID.deleteInstanceID",
fgorski 2015/04/22 17:34:59 deleteID
jianli 2015/04/22 20:18:20 Done.
+ INSTANCEID_DELETEINSTANCEID);
+
+ InstanceIDDeleteIDFunction();
+
+ protected:
+ ~InstanceIDDeleteIDFunction() override;
+
+ // ExtensionFunction:
+ bool RunAsync() final;
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_

Powered by Google App Engine
This is Rietveld 408576698