Chromium Code Reviews| 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..09057c9a039a23c66bb108e57089948904055a08 |
| --- /dev/null |
| +++ b/ppapi/thunk/ppb_alarms_dev_thunk.cc |
| @@ -0,0 +1,72 @@ |
| +// 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 "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): 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
|
| + |
| +void Create(PP_Instance instance, |
| + PP_Var name, |
| + const PP_Alarms_AlarmCreateInfo_Dev* alarm_info) { |
| +} |
|
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.
|
| + |
| +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(); |
| + |
| + return enter.SetResult(PP_ERROR_FAILED); |
| +} |
| + |
| +int32_t GetAll(PP_Instance instance, |
| + PP_Alarms_Alarm_Array_Dev* alarms, |
| + PP_CompletionCallback callback) { |
| + EnterInstanceAPI<ExtensionsCommon_API> enter(instance, callback); |
| + if (enter.failed()) |
| + return enter.retval(); |
| + |
| + return enter.SetResult(PP_ERROR_FAILED); |
| +} |
| + |
| +void Clear(PP_Instance instance, PP_Var name) { |
| +} |
| + |
| +void ClearAll(PP_Instance instance) { |
| +} |
| + |
| +uint32_t AddOnAlarmListener(PP_Instance instance, |
| + PP_Alarms_OnAlarm_Dev callback, |
| + void* user_data) { |
| + 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 |