| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ppapi/proxy/ppb_core_proxy.h" | 5 #include "ppapi/proxy/ppb_core_proxy.h" |
| 6 | 6 |
| 7 #include <stdlib.h> // For malloc | 7 #include <stdlib.h> // For malloc |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 using ppapi::TimeToPPTime; | 22 using ppapi::TimeToPPTime; |
| 23 using ppapi::TimeTicksToPPTimeTicks; | 23 using ppapi::TimeTicksToPPTimeTicks; |
| 24 | 24 |
| 25 namespace pp { | 25 namespace pp { |
| 26 namespace proxy { | 26 namespace proxy { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 base::MessageLoopProxy* GetMainThreadMessageLoop() { | 30 base::MessageLoopProxy* GetMainThreadMessageLoop() { |
| 31 static scoped_refptr<base::MessageLoopProxy> proxy( | 31 static scoped_refptr<base::MessageLoopProxy> proxy( |
| 32 base::MessageLoopProxy::CreateForCurrentThread()); | 32 base::MessageLoopProxy::current()); |
| 33 return proxy.get(); | 33 return proxy.get(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void AddRefResource(PP_Resource resource) { | 36 void AddRefResource(PP_Resource resource) { |
| 37 PluginResourceTracker::GetInstance()->AddRefResource(resource); | 37 PluginResourceTracker::GetInstance()->AddRefResource(resource); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void ReleaseResource(PP_Resource resource) { | 40 void ReleaseResource(PP_Resource resource) { |
| 41 PluginResourceTracker::GetInstance()->ReleaseResource(resource); | 41 PluginResourceTracker::GetInstance()->ReleaseResource(resource); |
| 42 } | 42 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 void PPB_Core_Proxy::OnMsgAddRefResource(HostResource resource) { | 121 void PPB_Core_Proxy::OnMsgAddRefResource(HostResource resource) { |
| 122 ppb_core_target()->AddRefResource(resource.host_resource()); | 122 ppb_core_target()->AddRefResource(resource.host_resource()); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void PPB_Core_Proxy::OnMsgReleaseResource(HostResource resource) { | 125 void PPB_Core_Proxy::OnMsgReleaseResource(HostResource resource) { |
| 126 ppb_core_target()->ReleaseResource(resource.host_resource()); | 126 ppb_core_target()->ReleaseResource(resource.host_resource()); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace proxy | 129 } // namespace proxy |
| 130 } // namespace pp | 130 } // namespace pp |
| OLD | NEW |