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

Unified Diff: ppapi/thunk/ppb_alarms_dev_thunk.cc

Issue 103993006: Add PPB_Alarms_Dev interface definition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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
« no previous file with comments | « ppapi/thunk/interfaces_ppb_public_dev.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_alarms_dev_thunk.cc
diff --git a/ppapi/thunk/ppb_alarms_dev_thunk.cc b/ppapi/thunk/ppb_alarms_dev_thunk.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1743532e9b89389674c60579d6d0ef0f833d783f
--- /dev/null
+++ b/ppapi/thunk/ppb_alarms_dev_thunk.cc
@@ -0,0 +1,82 @@
+// Copyright (c) 2013 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.
+
+#include "base/logging.h"
+#include "ppapi/c/dev/ppb_alarms_dev.h"
+#include "ppapi/shared_impl/tracked_callback.h"
+#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/extensions_common_api.h"
+#include "ppapi/thunk/thunk.h"
+
+namespace ppapi {
+namespace thunk {
+
+namespace {
+
+// TODO(yzshen): crbug.com/327197 Implement the thunk.
+
+void Create(PP_Instance instance,
+ PP_Var name,
+ const PP_Alarms_AlarmCreateInfo_Dev* alarm_info) {
+ NOTIMPLEMENTED();
+}
+
+int32_t Get(PP_Instance instance,
+ PP_Var name,
+ PP_Alarms_Alarm_Dev* alarm,
+ PP_CompletionCallback callback) {
+ EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback);
+ if (enter.failed())
+ return enter.retval();
+
+ NOTIMPLEMENTED();
+
+ return enter.SetResult(PP_ERROR_FAILED);
+}
+
+int32_t GetAll(PP_Instance instance,
+ PP_Alarms_Alarm_Array_Dev* alarms,
+ PP_ArrayOutput array_allocator,
+ PP_CompletionCallback callback) {
+ EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback);
+ if (enter.failed())
+ return enter.retval();
+
+ NOTIMPLEMENTED();
+
+ return enter.SetResult(PP_ERROR_FAILED);
+}
+
+void Clear(PP_Instance instance, PP_Var name) {
+ NOTIMPLEMENTED();
+}
+
+void ClearAll(PP_Instance instance) {
+ NOTIMPLEMENTED();
+}
+
+uint32_t AddOnAlarmListener(PP_Instance instance,
+ PP_Alarms_OnAlarm_Dev callback,
+ void* user_data) {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+const PPB_Alarms_Dev_0_1 g_ppb_alarms_dev_0_1_thunk = {
+ &Create,
+ &Get,
+ &GetAll,
+ &Clear,
+ &ClearAll,
+ &AddOnAlarmListener
+};
+
+} // namespace
+
+const PPB_Alarms_Dev_0_1* GetPPB_Alarms_Dev_0_1_Thunk() {
+ return &g_ppb_alarms_dev_0_1_thunk;
+}
+
+} // namespace thunk
+} // namespace ppapi
« no previous file with comments | « ppapi/thunk/interfaces_ppb_public_dev.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698