summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_proxy_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/plugins/ppapi/ppb_proxy_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_proxy_impl.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/webkit/plugins/ppapi/ppb_proxy_impl.cc b/webkit/plugins/ppapi/ppb_proxy_impl.cc
index 884ad7d..ece3410 100644
--- a/webkit/plugins/ppapi/ppb_proxy_impl.cc
+++ b/webkit/plugins/ppapi/ppb_proxy_impl.cc
@@ -7,13 +7,11 @@
#include "ppapi/c/private/ppb_proxy_private.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_image_data_api.h"
-#include "webkit/plugins/ppapi/host_globals.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
#include "webkit/plugins/ppapi/resource_tracker.h"
-using ppapi::PpapiGlobals;
using ppapi::thunk::EnterResource;
using ppapi::thunk::PPB_URLLoader_API;
@@ -23,15 +21,13 @@ namespace ppapi {
namespace {
void PluginCrashed(PP_Module module) {
- PluginModule* plugin_module =
- HostGlobals::Get()->host_resource_tracker()->GetModule(module);
+ PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module);
if (plugin_module)
plugin_module->PluginCrashed();
}
PP_Instance GetInstanceForResource(PP_Resource resource) {
- ::ppapi::Resource* obj =
- PpapiGlobals::Get()->GetResourceTracker()->GetResource(resource);
+ ::ppapi::Resource* obj = ResourceTracker::Get()->GetResource(resource);
if (!obj)
return 0;
return obj->pp_instance();
@@ -39,8 +35,7 @@ PP_Instance GetInstanceForResource(PP_Resource resource) {
void SetReserveInstanceIDCallback(PP_Module module,
PP_Bool (*reserve)(PP_Module, PP_Instance)) {
- PluginModule* plugin_module =
- HostGlobals::Get()->host_resource_tracker()->GetModule(module);
+ PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module);
if (plugin_module)
plugin_module->SetReserveInstanceIDCallback(reserve);
}
@@ -53,22 +48,19 @@ int32_t GetURLLoaderBufferedBytes(PP_Resource url_loader) {
}
void AddRefModule(PP_Module module) {
- PluginModule* plugin_module =
- HostGlobals::Get()->host_resource_tracker()->GetModule(module);
+ PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module);
if (plugin_module)
plugin_module->AddRef();
}
void ReleaseModule(PP_Module module) {
- PluginModule* plugin_module =
- HostGlobals::Get()->host_resource_tracker()->GetModule(module);
+ PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module);
if (plugin_module)
plugin_module->Release();
}
PP_Bool IsInModuleDestructor(PP_Module module) {
- PluginModule* plugin_module =
- HostGlobals::Get()->host_resource_tracker()->GetModule(module);
+ PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module);
if (plugin_module)
return PP_FromBool(plugin_module->is_in_destructor());
return PP_FALSE;