OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 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 // From ppb_mojo.idl modified Tue Sep 16 14:08:32 2014. |
| 6 |
| 7 #include "ppapi/c/pp_completion_callback.h" |
| 8 #include "ppapi/c/pp_errors.h" |
| 9 #include "ppapi/c/ppb_mojo.h" |
| 10 #include "ppapi/shared_impl/tracked_callback.h" |
| 11 #include "ppapi/thunk/enter.h" |
| 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 13 #include "ppapi/thunk/ppb_mojo_api.h" |
| 14 |
| 15 namespace ppapi { |
| 16 namespace thunk { |
| 17 |
| 18 namespace { |
| 19 |
| 20 int32_t GetHandle(PP_Instance instance, |
| 21 uint32_t* mojo_handle, |
| 22 struct PP_CompletionCallback callback) { |
| 23 VLOG(4) << "PPB_Mojo::GetHandle()"; |
| 24 EnterInstanceAPI<PPB_Mojo_API> enter(instance, callback); |
| 25 if (enter.failed()) |
| 26 return enter.retval(); |
| 27 return enter.SetResult(enter.functions()->GetHandle(instance, |
| 28 mojo_handle, |
| 29 enter.callback())); |
| 30 } |
| 31 |
| 32 const PPB_Mojo_0_1 g_ppb_mojo_thunk_0_1 = { |
| 33 &GetHandle |
| 34 }; |
| 35 |
| 36 } // namespace |
| 37 |
| 38 PPAPI_THUNK_EXPORT const PPB_Mojo_0_1* GetPPB_Mojo_0_1_Thunk() { |
| 39 return &g_ppb_mojo_thunk_0_1; |
| 40 } |
| 41 |
| 42 } // namespace thunk |
| 43 } // namespace ppapi |
OLD | NEW |