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

Side by Side Diff: ppapi/thunk/ppb_mojo_thunk.cc

Issue 598183002: Pepper: PPB_Mojo prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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
« no previous file with comments | « ppapi/thunk/ppb_mojo_api.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) 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
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_mojo_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698