OLD | NEW |
---|---|
(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 "ppapi/c/dev/ppb_alarms_dev.h" | |
6 #include "ppapi/shared_impl/tracked_callback.h" | |
7 #include "ppapi/thunk/enter.h" | |
8 #include "ppapi/thunk/extensions_common_api.h" | |
9 #include "ppapi/thunk/thunk.h" | |
10 | |
11 namespace ppapi { | |
12 namespace thunk { | |
13 | |
14 namespace { | |
15 | |
16 // TODO(yzshen): Implement the thunk. | |
dmichael (off chromium)
2013/12/06 17:44:07
might be good to reference the bug.
yzshen1
2013/12/06 21:38:21
I think it is not something that we will forget. :
dmichael (off chromium)
2013/12/09 22:50:09
I'm really talking about the larger work. Either t
yzshen1
2013/12/10 18:06:56
This is a good point.
I have filed a meta bug and
| |
17 | |
18 void Create(PP_Instance instance, | |
19 PP_Var name, | |
20 const PP_Alarms_AlarmCreateInfo_Dev* alarm_info) { | |
21 } | |
dmichael (off chromium)
2013/12/06 17:44:07
You could put NOTIMPLEMENTED() in all of these if
yzshen1
2013/12/06 21:38:21
Done.
| |
22 | |
23 int32_t Get(PP_Instance instance, | |
24 PP_Var name, | |
25 PP_Alarms_Alarm_Dev* alarm, | |
26 PP_CompletionCallback callback) { | |
27 EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback); | |
28 if (enter.failed()) | |
29 return enter.retval(); | |
30 | |
31 return enter.SetResult(PP_ERROR_FAILED); | |
32 } | |
33 | |
34 int32_t GetAll(PP_Instance instance, | |
35 PP_Alarms_Alarm_Array_Dev* alarms, | |
36 PP_CompletionCallback callback) { | |
37 EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback); | |
38 if (enter.failed()) | |
39 return enter.retval(); | |
40 | |
41 return enter.SetResult(PP_ERROR_FAILED); | |
42 } | |
43 | |
44 void Clear(PP_Instance instance, PP_Var name) { | |
45 } | |
46 | |
47 void ClearAll(PP_Instance instance) { | |
48 } | |
49 | |
50 uint32_t AddOnAlarmListener(PP_Instance instance, | |
51 PP_Alarms_OnAlarm_Dev callback, | |
52 void* user_data) { | |
53 return 0; | |
54 } | |
55 | |
56 const PPB_Alarms_Dev_0_1 g_ppb_alarms_dev_0_1_thunk = { | |
57 &Create, | |
58 &Get, | |
59 &GetAll, | |
60 &Clear, | |
61 &ClearAll, | |
62 &AddOnAlarmListener | |
63 }; | |
64 | |
65 } // namespace | |
66 | |
67 const PPB_Alarms_Dev_0_1* GetPPB_Alarms_Dev_0_1_Thunk() { | |
68 return &g_ppb_alarms_dev_0_1_thunk; | |
69 } | |
70 | |
71 } // namespace thunk | |
72 } // namespace ppapi | |
OLD | NEW |