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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/thunk/interfaces_ppb_public_dev.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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.
4
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"
11
12 namespace ppapi {
13 namespace thunk {
14
15 namespace {
16
17 // TODO(yzshen): crbug.com/327197 Implement the thunk.
18
19 void Create(PP_Instance instance,
20 PP_Var name,
21 const PP_Alarms_AlarmCreateInfo_Dev* alarm_info) {
22 NOTIMPLEMENTED();
23 }
24
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();
32
33 NOTIMPLEMENTED();
34
35 return enter.SetResult(PP_ERROR_FAILED);
36 }
37
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();
45
46 NOTIMPLEMENTED();
47
48 return enter.SetResult(PP_ERROR_FAILED);
49 }
50
51 void Clear(PP_Instance instance, PP_Var name) {
52 NOTIMPLEMENTED();
53 }
54
55 void ClearAll(PP_Instance instance) {
56 NOTIMPLEMENTED();
57 }
58
59 uint32_t AddOnAlarmListener(PP_Instance instance,
60 PP_Alarms_OnAlarm_Dev callback,
61 void* user_data) {
62 NOTIMPLEMENTED();
63 return 0;
64 }
65
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
73 };
74
75 } // namespace
76
77 const PPB_Alarms_Dev_0_1* GetPPB_Alarms_Dev_0_1_Thunk() {
78 return &g_ppb_alarms_dev_0_1_thunk;
79 }
80
81 } // namespace thunk
82 } // namespace ppapi
OLDNEW
« 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