Remove the RenderProcessHost observer and attach the WebContentsObserver earlier...
[chromium-blink-merge.git] / mojo / examples / pepper_container_app / ppb_core_thunk.cc
bloba76a976478591f37408e661f4317c356ff679559
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"
12 namespace mojo {
13 namespace examples {
15 namespace {
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);
27 PP_Time GetTime() {
28 NOTIMPLEMENTED();
29 return 0;
32 PP_TimeTicks GetTimeTicks() {
33 NOTIMPLEMENTED();
34 return 0;
37 void CallOnMainThread(int32_t delay_in_milliseconds,
38 PP_CompletionCallback callback,
39 int32_t result) {
40 NOTIMPLEMENTED();
43 PP_Bool IsMainThread() {
44 NOTIMPLEMENTED();
45 return PP_TRUE;
48 } // namespace
50 const PPB_Core_1_0 g_ppb_core_thunk_1_0 = {
51 &AddRefResource,
52 &ReleaseResource,
53 &GetTime,
54 &GetTimeTicks,
55 &CallOnMainThread,
56 &IsMainThread
59 const PPB_Core_1_0* GetPPB_Core_1_0_Thunk() {
60 return &g_ppb_core_thunk_1_0;
63 } // namespace examples
64 } // namespace mojo