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.
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"
17 void AddRefResource(PP_Resource resource
) {
18 ppapi::ProxyAutoLock lock
;
19 ppapi::PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(resource
);
22 void ReleaseResource(PP_Resource resource
) {
23 ppapi::ProxyAutoLock lock
;
24 ppapi::PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(resource
);
32 PP_TimeTicks
GetTimeTicks() {
37 void CallOnMainThread(int32_t delay_in_milliseconds
,
38 PP_CompletionCallback callback
,
43 PP_Bool
IsMainThread() {
50 const PPB_Core_1_0 g_ppb_core_thunk_1_0
= {
59 const PPB_Core_1_0
* GetPPB_Core_1_0_Thunk() {
60 return &g_ppb_core_thunk_1_0
;
63 } // namespace examples