Introduce AndroidMetricsProvider class.
[chromium-blink-merge.git] / ppapi / thunk / ppb_alarms_dev_thunk.cc
blob2d2ae14b89ffc067fa514e45eae6cec71919b4a0
1 // Copyright 2013 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 #include "base/logging.h"
6 #include "ppapi/c/dev/ppb_alarms_dev.h"
7 #include "ppapi/shared_impl/tracked_callback.h"
8 #include "ppapi/thunk/enter.h"
9 #include "ppapi/thunk/extensions_common_api.h"
10 #include "ppapi/thunk/thunk.h"
12 namespace ppapi {
13 namespace thunk {
15 namespace {
17 // TODO(yzshen): crbug.com/327197 Implement the thunk.
19 void Create(PP_Instance instance,
20 PP_Var name,
21 const PP_Alarms_AlarmCreateInfo_Dev* alarm_info) {
22 NOTIMPLEMENTED();
25 int32_t Get(PP_Instance instance,
26 PP_Var name,
27 PP_Alarms_Alarm_Dev* alarm,
28 PP_CompletionCallback callback) {
29 EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback);
30 if (enter.failed())
31 return enter.retval();
33 NOTIMPLEMENTED();
35 return enter.SetResult(PP_ERROR_FAILED);
38 int32_t GetAll(PP_Instance instance,
39 PP_Alarms_Alarm_Array_Dev* alarms,
40 PP_ArrayOutput array_allocator,
41 PP_CompletionCallback callback) {
42 EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback);
43 if (enter.failed())
44 return enter.retval();
46 NOTIMPLEMENTED();
48 return enter.SetResult(PP_ERROR_FAILED);
51 void Clear(PP_Instance instance, PP_Var name) {
52 NOTIMPLEMENTED();
55 void ClearAll(PP_Instance instance) {
56 NOTIMPLEMENTED();
59 uint32_t AddOnAlarmListener(PP_Instance instance,
60 PP_Alarms_OnAlarm_Dev callback,
61 void* user_data) {
62 NOTIMPLEMENTED();
63 return 0;
66 const PPB_Alarms_Dev_0_1 g_ppb_alarms_dev_0_1_thunk = {
67 &Create,
68 &Get,
69 &GetAll,
70 &Clear,
71 &ClearAll,
72 &AddOnAlarmListener
75 } // namespace
77 const PPB_Alarms_Dev_0_1* GetPPB_Alarms_Dev_0_1_Thunk() {
78 return &g_ppb_alarms_dev_0_1_thunk;
81 } // namespace thunk
82 } // namespace ppapi