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

Side by Side Diff: mojo/examples/pepper_container_app/ppb_core_thunk.cc

Issue 178953003: Mojo container example for hosting Pepper plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 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 #include "base/logging.h"
6 #include "mojo/examples/pepper_container_app/thunk.h"
7 #include "ppapi/c/ppb_core.h"
8 #include "ppapi/shared_impl/ppapi_globals.h"
9 #include "ppapi/shared_impl/proxy_lock.h"
10 #include "ppapi/shared_impl/resource_tracker.h"
11
12 namespace mojo {
13 namespace examples {
14
15 namespace {
16
17 void AddRefResource(PP_Resource resource) {
18 ppapi::ProxyAutoLock lock;
19 ppapi::PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(resource);
20 }
21
22 void ReleaseResource(PP_Resource resource) {
23 ppapi::ProxyAutoLock lock;
24 ppapi::PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(resource);
25 }
26
27 PP_Time GetTime() {
28 NOTIMPLEMENTED();
29 return 0;
30 }
31
32 PP_TimeTicks GetTimeTicks() {
33 NOTIMPLEMENTED();
34 return 0;
35 }
36
37 void CallOnMainThread(int32_t delay_in_milliseconds,
38 PP_CompletionCallback callback,
39 int32_t result) {
40 NOTIMPLEMENTED();
41 }
42
43 PP_Bool IsMainThread() {
44 NOTIMPLEMENTED();
45 return PP_TRUE;
46 }
47
48 } // namespace
49
50 const PPB_Core_1_0 g_ppb_core_thunk_1_0 = {
51 &AddRefResource,
52 &ReleaseResource,
53 &GetTime,
54 &GetTimeTicks,
55 &CallOnMainThread,
56 &IsMainThread
57 };
58
59 const PPB_Core_1_0* GetPPB_Core_1_0_Thunk() {
60 return &g_ppb_core_thunk_1_0;
61 }
62
63 } // namespace examples
64 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/pepper_container_app/plugin_module.cc ('k') | mojo/examples/pepper_container_app/ppb_opengles2_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698