summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 21:44:27 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 21:44:27 +0000
commit5107bb375e729ca18da5fd56c45b5e5bda1b9612 (patch)
treeb0729be474ee1556d3eec71ccc87039dd20571c3 /webkit
parentadd6501064facc2b74704902d0a206fa36944723 (diff)
downloadchromium_src-5107bb375e729ca18da5fd56c45b5e5bda1b9612.zip
chromium_src-5107bb375e729ca18da5fd56c45b5e5bda1b9612.tar.gz
chromium_src-5107bb375e729ca18da5fd56c45b5e5bda1b9612.tar.bz2
Rename the ResourceTracker in webkit to HostResourceTracker.
This fixes the confusion that comes from there being two: webkit/plugins/ppapi/resource_tracker and ppapi/shared_impl/resource_tracker. TEST=none BUG=none Review URL: http://codereview.chromium.org/8320010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webkit_glue.gypi4
-rw-r--r--webkit/plugins/ppapi/callbacks_unittest.cc6
-rw-r--r--webkit/plugins/ppapi/host_globals.h8
-rw-r--r--webkit/plugins/ppapi/host_resource_tracker.cc (renamed from webkit/plugins/ppapi/resource_tracker.cc)40
-rw-r--r--webkit/plugins/ppapi/host_resource_tracker.h (renamed from webkit/plugins/ppapi/resource_tracker.h)20
-rw-r--r--webkit/plugins/ppapi/host_resource_tracker_unittest.cc (renamed from webkit/plugins/ppapi/resource_tracker_unittest.cc)14
-rw-r--r--webkit/plugins/ppapi/npapi_glue.cc2
-rw-r--r--webkit/plugins/ppapi/npobject_var.cc2
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc2
-rw-r--r--webkit/plugins/ppapi/plugin_object.cc3
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_directory_reader_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_file_io_impl.cc1
-rw-r--r--webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_flash_file_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_flash_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_proxy_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_var_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_video_capture_impl.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_video_decoder_impl.cc4
-rw-r--r--webkit/plugins/ppapi/quota_file_io.cc2
-rw-r--r--webkit/plugins/ppapi/resource_helper.cc6
-rw-r--r--webkit/tools/test_shell/test_shell.gypi2
23 files changed, 67 insertions, 65 deletions
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 80252e6..228dcad 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -206,6 +206,8 @@
'../plugins/ppapi/fullscreen_container.h',
'../plugins/ppapi/host_globals.cc',
'../plugins/ppapi/host_globals.h',
+ '../plugins/ppapi/host_resource_tracker.cc',
+ '../plugins/ppapi/host_resource_tracker.h',
'../plugins/ppapi/message_channel.cc',
'../plugins/ppapi/message_channel.h',
'../plugins/ppapi/npapi_glue.cc',
@@ -302,8 +304,6 @@
'../plugins/ppapi/resource_creation_impl.h',
'../plugins/ppapi/resource_helper.cc',
'../plugins/ppapi/resource_helper.h',
- '../plugins/ppapi/resource_tracker.cc',
- '../plugins/ppapi/resource_tracker.h',
'../plugins/ppapi/string.cc',
'../plugins/ppapi/string.h',
'../plugins/ppapi/webkit_forwarding_impl.cc',
diff --git a/webkit/plugins/ppapi/callbacks_unittest.cc b/webkit/plugins/ppapi/callbacks_unittest.cc
index b11c725..8e90b31 100644
--- a/webkit/plugins/ppapi/callbacks_unittest.cc
+++ b/webkit/plugins/ppapi/callbacks_unittest.cc
@@ -8,13 +8,13 @@
#include "base/message_loop.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
+#include "ppapi/shared_impl/resource_tracker.h"
#include "webkit/plugins/ppapi/callbacks.h"
#include "webkit/plugins/ppapi/host_globals.h"
#include "webkit/plugins/ppapi/mock_resource.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/resource_helper.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
namespace webkit {
namespace ppapi {
@@ -185,7 +185,7 @@ class CallbackResourceTest : public PpapiUnittest {
// Test that callbacks get aborted on the last resource unref.
TEST_F(CallbackResourceTest, AbortOnNoRef) {
- ResourceTracker* resource_tracker =
+ HostResourceTracker* resource_tracker =
HostGlobals::Get()->host_resource_tracker();
// Test several things: Unref-ing a resource (to zero refs) with callbacks
@@ -225,7 +225,7 @@ TEST_F(CallbackResourceTest, AbortOnNoRef) {
// Test that "resurrecting" a resource (getting a new ID for a |Resource|)
// doesn't resurrect callbacks.
TEST_F(CallbackResourceTest, Resurrection) {
- ResourceTracker* resource_tracker =
+ HostResourceTracker* resource_tracker =
HostGlobals::Get()->host_resource_tracker();
scoped_refptr<CallbackMockResource> resource(
diff --git a/webkit/plugins/ppapi/host_globals.h b/webkit/plugins/ppapi/host_globals.h
index 69b18d0..4c6a7d0 100644
--- a/webkit/plugins/ppapi/host_globals.h
+++ b/webkit/plugins/ppapi/host_globals.h
@@ -8,7 +8,7 @@
#include "base/compiler_specific.h"
#include "ppapi/shared_impl/ppapi_globals.h"
#include "ppapi/shared_impl/var_tracker.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
namespace webkit {
namespace ppapi {
@@ -27,12 +27,14 @@ class HostGlobals : public ::ppapi::PpapiGlobals {
virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE;
virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE;
- ResourceTracker* host_resource_tracker() { return &host_resource_tracker_; }
+ HostResourceTracker* host_resource_tracker() {
+ return &host_resource_tracker_;
+ }
private:
static HostGlobals* host_globals_;
- ResourceTracker host_resource_tracker_;
+ HostResourceTracker host_resource_tracker_;
::ppapi::VarTracker host_var_tracker_;
DISALLOW_COPY_AND_ASSIGN(HostGlobals);
diff --git a/webkit/plugins/ppapi/resource_tracker.cc b/webkit/plugins/ppapi/host_resource_tracker.cc
index 0743723..63a37dd 100644
--- a/webkit/plugins/ppapi/resource_tracker.cc
+++ b/webkit/plugins/ppapi/host_resource_tracker.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/plugins/ppapi/resource_tracker.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include <limits>
#include <set>
@@ -44,7 +44,7 @@ namespace {
typedef std::map<NPObject*, NPObjectVar*> NPObjectToNPObjectVarMap;
-struct ResourceTracker::InstanceData {
+struct HostResourceTracker::InstanceData {
InstanceData() : instance(0) {}
// Non-owning pointer to the instance object. When a PluginInstance is
@@ -62,16 +62,16 @@ struct ResourceTracker::InstanceData {
function_proxies[::ppapi::proxy::INTERFACE_ID_COUNT];
};
-ResourceTracker::ResourceTracker() {
+HostResourceTracker::HostResourceTracker() {
// Wire up the new shared resource tracker base to use our implementation.
::ppapi::TrackerBase::Init(&GetTrackerBase);
}
-ResourceTracker::~ResourceTracker() {
+HostResourceTracker::~HostResourceTracker() {
}
-void ResourceTracker::CleanupInstanceData(PP_Instance instance,
- bool delete_instance) {
+void HostResourceTracker::CleanupInstanceData(PP_Instance instance,
+ bool delete_instance) {
DLOG_IF(ERROR, !CheckIdType(instance, ::ppapi::PP_ID_TYPE_INSTANCE))
<< instance << " is not a PP_Instance.";
InstanceMap::iterator found = instance_map_.find(instance);
@@ -103,7 +103,7 @@ void ResourceTracker::CleanupInstanceData(PP_Instance instance,
instance_map_.erase(found);
}
-::ppapi::FunctionGroupBase* ResourceTracker::GetFunctionAPI(
+::ppapi::FunctionGroupBase* HostResourceTracker::GetFunctionAPI(
PP_Instance pp_instance,
::ppapi::proxy::InterfaceID id) {
// Get the instance object. This also ensures that the instance data is in
@@ -142,14 +142,14 @@ void ResourceTracker::CleanupInstanceData(PP_Instance instance,
return proxy.get();
}
-PP_Module ResourceTracker::GetModuleForInstance(PP_Instance instance) {
+PP_Module HostResourceTracker::GetModuleForInstance(PP_Instance instance) {
PluginInstance* inst = GetInstance(instance);
if (!inst)
return 0;
return inst->module()->pp_module();
}
-void ResourceTracker::LastPluginRefWasDeleted(::ppapi::Resource* object) {
+void HostResourceTracker::LastPluginRefWasDeleted(::ppapi::Resource* object) {
::ppapi::ResourceTracker::LastPluginRefWasDeleted(object);
// TODO(brettw) this should be removed when we have the callback tracker
@@ -163,7 +163,7 @@ void ResourceTracker::LastPluginRefWasDeleted(::ppapi::Resource* object) {
}
}
-void ResourceTracker::AddNPObjectVar(NPObjectVar* object_var) {
+void HostResourceTracker::AddNPObjectVar(NPObjectVar* object_var) {
DCHECK(instance_map_.find(object_var->pp_instance()) != instance_map_.end());
InstanceData& data = *instance_map_[object_var->pp_instance()].get();
@@ -172,7 +172,7 @@ void ResourceTracker::AddNPObjectVar(NPObjectVar* object_var) {
data.np_object_to_object_var[object_var->np_object()] = object_var;
}
-void ResourceTracker::RemoveNPObjectVar(NPObjectVar* object_var) {
+void HostResourceTracker::RemoveNPObjectVar(NPObjectVar* object_var) {
DCHECK(instance_map_.find(object_var->pp_instance()) != instance_map_.end());
InstanceData& data = *instance_map_[object_var->pp_instance()].get();
@@ -189,7 +189,7 @@ void ResourceTracker::RemoveNPObjectVar(NPObjectVar* object_var) {
data.np_object_to_object_var.erase(found);
}
-NPObjectVar* ResourceTracker::NPObjectVarForNPObject(PP_Instance instance,
+NPObjectVar* HostResourceTracker::NPObjectVarForNPObject(PP_Instance instance,
NPObject* np_object) {
DCHECK(instance_map_.find(instance) != instance_map_.end());
InstanceData& data = *instance_map_[instance].get();
@@ -201,7 +201,7 @@ NPObjectVar* ResourceTracker::NPObjectVarForNPObject(PP_Instance instance,
return found->second;
}
-int ResourceTracker::GetLiveNPObjectVarsForInstance(
+int HostResourceTracker::GetLiveNPObjectVarsForInstance(
PP_Instance instance) const {
InstanceMap::const_iterator found = instance_map_.find(instance);
if (found == instance_map_.end())
@@ -209,7 +209,7 @@ int ResourceTracker::GetLiveNPObjectVarsForInstance(
return static_cast<int>(found->second->np_object_to_object_var.size());
}
-PP_Instance ResourceTracker::AddInstance(PluginInstance* instance) {
+PP_Instance HostResourceTracker::AddInstance(PluginInstance* instance) {
DCHECK(instance_map_.find(instance->pp_instance()) == instance_map_.end());
// Use a random number for the instance ID. This helps prevent some
@@ -231,17 +231,17 @@ PP_Instance ResourceTracker::AddInstance(PluginInstance* instance) {
return new_instance;
}
-void ResourceTracker::InstanceDeleted(PP_Instance instance) {
+void HostResourceTracker::InstanceDeleted(PP_Instance instance) {
DidDeleteInstance(instance);
CleanupInstanceData(instance, true);
}
-void ResourceTracker::InstanceCrashed(PP_Instance instance) {
+void HostResourceTracker::InstanceCrashed(PP_Instance instance) {
DidDeleteInstance(instance);
CleanupInstanceData(instance, false);
}
-PluginInstance* ResourceTracker::GetInstance(PP_Instance instance) {
+PluginInstance* HostResourceTracker::GetInstance(PP_Instance instance) {
DLOG_IF(ERROR, !CheckIdType(instance, ::ppapi::PP_ID_TYPE_INSTANCE))
<< instance << " is not a PP_Instance.";
InstanceMap::iterator found = instance_map_.find(instance);
@@ -250,7 +250,7 @@ PluginInstance* ResourceTracker::GetInstance(PP_Instance instance) {
return found->second->instance;
}
-PP_Module ResourceTracker::AddModule(PluginModule* module) {
+PP_Module HostResourceTracker::AddModule(PluginModule* module) {
#ifndef NDEBUG
// Make sure we're not adding one more than once.
for (ModuleMap::const_iterator i = module_map_.begin();
@@ -269,7 +269,7 @@ PP_Module ResourceTracker::AddModule(PluginModule* module) {
return new_module;
}
-void ResourceTracker::ModuleDeleted(PP_Module module) {
+void HostResourceTracker::ModuleDeleted(PP_Module module) {
DLOG_IF(ERROR, !CheckIdType(module, ::ppapi::PP_ID_TYPE_MODULE))
<< module << " is not a PP_Module.";
ModuleMap::iterator found = module_map_.find(module);
@@ -280,7 +280,7 @@ void ResourceTracker::ModuleDeleted(PP_Module module) {
module_map_.erase(found);
}
-PluginModule* ResourceTracker::GetModule(PP_Module module) {
+PluginModule* HostResourceTracker::GetModule(PP_Module module) {
DLOG_IF(ERROR, !CheckIdType(module, ::ppapi::PP_ID_TYPE_MODULE))
<< module << " is not a PP_Module.";
ModuleMap::iterator found = module_map_.find(module);
diff --git a/webkit/plugins/ppapi/resource_tracker.h b/webkit/plugins/ppapi/host_resource_tracker.h
index 221a8f9..1883707 100644
--- a/webkit/plugins/ppapi/resource_tracker.h
+++ b/webkit/plugins/ppapi/host_resource_tracker.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_
-#define WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_
+#ifndef WEBKIT_PLUGINS_PPAPI_HOST_RESOURCE_TRACKER_H_
+#define WEBKIT_PLUGINS_PPAPI_HOST_RESOURCE_TRACKER_H_
#include <map>
#include <set>
@@ -36,17 +36,17 @@ namespace ppapi {
class PluginInstance;
class PluginModule;
-class ResourceTrackerTest;
+class HostResourceTrackerTest;
// This class maintains a global list of all live pepper resources. It allows
// us to check resource ID validity and to map them to a specific module.
//
// This object is NOT threadsafe.
-class ResourceTracker : public ::ppapi::TrackerBase,
- public ::ppapi::ResourceTracker {
+class HostResourceTracker : public ::ppapi::TrackerBase,
+ public ::ppapi::ResourceTracker {
public:
- ResourceTracker();
- virtual ~ResourceTracker();
+ HostResourceTracker();
+ virtual ~HostResourceTracker();
// PP_Resources --------------------------------------------------------------
@@ -110,7 +110,7 @@ class ResourceTracker : public ::ppapi::TrackerBase,
PluginInstance* GetInstance(PP_Instance instance);
private:
- friend class ResourceTrackerTest;
+ friend class HostResourceTrackerTest;
typedef std::set<PP_Resource> ResourceSet;
@@ -136,10 +136,10 @@ class ResourceTracker : public ::ppapi::TrackerBase,
typedef std::map<PP_Module, PluginModule*> ModuleMap;
ModuleMap module_map_;
- DISALLOW_COPY_AND_ASSIGN(ResourceTracker);
+ DISALLOW_COPY_AND_ASSIGN(HostResourceTracker);
};
} // namespace ppapi
} // namespace webkit
-#endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_TRACKER_H_
+#endif // WEBKIT_PLUGINS_PPAPI_HOST_RESOURCE_TRACKER_H_
diff --git a/webkit/plugins/ppapi/resource_tracker_unittest.cc b/webkit/plugins/ppapi/host_resource_tracker_unittest.cc
index 68a4b2f..a02e066 100644
--- a/webkit/plugins/ppapi/resource_tracker_unittest.cc
+++ b/webkit/plugins/ppapi/host_resource_tracker_unittest.cc
@@ -10,12 +10,12 @@
#include "third_party/npapi/bindings/npruntime.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/mock_plugin_delegate.h"
#include "webkit/plugins/ppapi/mock_resource.h"
#include "webkit/plugins/ppapi/npapi_glue.h"
#include "webkit/plugins/ppapi/npobject_var.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
using ppapi::NPObjectVar;
@@ -72,19 +72,19 @@ typedef scoped_ptr_malloc<NPObject, ReleaseNPObject> NPObjectReleaser;
} // namespace
-// ResourceTrackerTest ---------------------------------------------------------
+// HostResourceTrackerTest -----------------------------------------------------
-class ResourceTrackerTest : public PpapiUnittest {
+class HostResourceTrackerTest : public PpapiUnittest {
public:
- ResourceTrackerTest() {
+ HostResourceTrackerTest() {
}
- ResourceTracker& tracker() {
+ HostResourceTracker& tracker() {
return *HostGlobals::Get()->host_resource_tracker();
}
};
-TEST_F(ResourceTrackerTest, DeleteObjectVarWithInstance) {
+TEST_F(HostResourceTrackerTest, DeleteObjectVarWithInstance) {
// Make a second instance (the test harness already creates & manages one).
scoped_refptr<PluginInstance> instance2(
PluginInstance::Create1_0(delegate(), module(),
@@ -105,7 +105,7 @@ TEST_F(ResourceTrackerTest, DeleteObjectVarWithInstance) {
// Make sure that using the same NPObject should give the same PP_Var
// each time.
-TEST_F(ResourceTrackerTest, ReuseVar) {
+TEST_F(HostResourceTrackerTest, ReuseVar) {
NPObjectReleaser npobject(NewTrackedNPObject());
PP_Var pp_object1 = NPObjectToPPVar(instance(), npobject.get());
diff --git a/webkit/plugins/ppapi/npapi_glue.cc b/webkit/plugins/ppapi/npapi_glue.cc
index dceb25b..e8278d4 100644
--- a/webkit/plugins/ppapi/npapi_glue.cc
+++ b/webkit/plugins/ppapi/npapi_glue.cc
@@ -8,11 +8,11 @@
#include "base/memory/ref_counted.h"
#include "base/string_util.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/npobject_var.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/plugin_object.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npruntime.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
diff --git a/webkit/plugins/ppapi/npobject_var.cc b/webkit/plugins/ppapi/npobject_var.cc
index f87bea4..cb8a385 100644
--- a/webkit/plugins/ppapi/npobject_var.cc
+++ b/webkit/plugins/ppapi/npobject_var.cc
@@ -8,7 +8,7 @@
#include "ppapi/c/pp_var.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "webkit/plugins/ppapi/host_globals.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
using webkit::ppapi::HostGlobals;
using WebKit::WebBindings;
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index 48c747d..33861ef 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -90,6 +90,7 @@
#include "webkit/plugins/ppapi/callbacks.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/ppapi_interface_factory.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
@@ -111,7 +112,6 @@
#include "webkit/plugins/ppapi/ppb_video_capture_impl.h"
#include "webkit/plugins/ppapi/ppb_video_decoder_impl.h"
#include "webkit/plugins/ppapi/ppb_video_layer_impl.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
#include "webkit/plugins/ppapi/webkit_forwarding_impl.h"
using ppapi::PpapiGlobals;
diff --git a/webkit/plugins/ppapi/plugin_object.cc b/webkit/plugins/ppapi/plugin_object.cc
index fbbd349..5cd5396 100644
--- a/webkit/plugins/ppapi/plugin_object.cc
+++ b/webkit/plugins/ppapi/plugin_object.cc
@@ -16,12 +16,13 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/shared_impl/ppapi_globals.h"
+#include "ppapi/shared_impl/resource_tracker.h"
#include "ppapi/shared_impl/var.h"
+#include "ppapi/shared_impl/var_tracker.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "webkit/plugins/ppapi/npapi_glue.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
#include "webkit/plugins/ppapi/string.h"
using ppapi::PpapiGlobals;
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index cf7610a..5c912ee 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -62,6 +62,7 @@
#include "webkit/plugins/ppapi/event_conversion.h"
#include "webkit/plugins/ppapi/fullscreen_container.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/message_channel.h"
#include "webkit/plugins/ppapi/npapi_glue.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
@@ -75,7 +76,6 @@
#include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
#include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
#include "webkit/plugins/ppapi/ppp_pdf.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
#include "webkit/plugins/ppapi/string.h"
#include "webkit/plugins/sad_plugin.h"
diff --git a/webkit/plugins/ppapi/ppb_directory_reader_impl.cc b/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
index 63279cd..36843f4 100644
--- a/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
+++ b/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
@@ -10,6 +10,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/dev/ppb_directory_reader_dev.h"
#include "ppapi/shared_impl/ppapi_globals.h"
+#include "ppapi/shared_impl/resource_tracker.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_file_ref_api.h"
#include "webkit/plugins/ppapi/common.h"
@@ -20,7 +21,6 @@
#include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
#include "webkit/plugins/ppapi/ppb_file_system_impl.h"
#include "webkit/plugins/ppapi/resource_helper.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
using ::ppapi::PpapiGlobals;
using ::ppapi::thunk::EnterResourceNoLock;
diff --git a/webkit/plugins/ppapi/ppb_file_io_impl.cc b/webkit/plugins/ppapi/ppb_file_io_impl.cc
index 8401e38..351d232 100644
--- a/webkit/plugins/ppapi/ppb_file_io_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_io_impl.cc
@@ -26,7 +26,6 @@
#include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
#include "webkit/plugins/ppapi/quota_file_io.h"
#include "webkit/plugins/ppapi/resource_helper.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
using ppapi::PPTimeToTime;
using ppapi::TimeToPPTime;
diff --git a/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc b/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc
index fdffadf..85b2936 100644
--- a/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc
@@ -19,9 +19,9 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
using ppapi::StringVar;
diff --git a/webkit/plugins/ppapi/ppb_flash_file_impl.cc b/webkit/plugins/ppapi/ppb_flash_file_impl.cc
index 47b18f8..73339e9 100644
--- a/webkit/plugins/ppapi/ppb_flash_file_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_file_impl.cc
@@ -17,12 +17,12 @@
#include "webkit/plugins/ppapi/file_path.h"
#include "webkit/plugins/ppapi/file_type_conversions.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
#include "webkit/plugins/ppapi/resource_helper.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
#if defined(OS_WIN)
#include "base/utf_string_conversions.h"
diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc
index 78d5677..b155d35 100644
--- a/webkit/plugins/ppapi/ppb_flash_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_impl.cc
@@ -15,12 +15,12 @@
#include "ppapi/thunk/enter.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
#include "webkit/plugins/ppapi/resource_helper.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
using ppapi::PPTimeToTime;
using ppapi::StringVar;
diff --git a/webkit/plugins/ppapi/ppb_proxy_impl.cc b/webkit/plugins/ppapi/ppb_proxy_impl.cc
index 884ad7d..be765d9 100644
--- a/webkit/plugins/ppapi/ppb_proxy_impl.cc
+++ b/webkit/plugins/ppapi/ppb_proxy_impl.cc
@@ -8,10 +8,10 @@
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_image_data_api.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.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;
diff --git a/webkit/plugins/ppapi/ppb_var_impl.cc b/webkit/plugins/ppapi/ppb_var_impl.cc
index 59df63d..0769e82 100644
--- a/webkit/plugins/ppapi/ppb_var_impl.cc
+++ b/webkit/plugins/ppapi/ppb_var_impl.cc
@@ -12,12 +12,12 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/npapi_glue.h"
#include "webkit/plugins/ppapi/npobject_var.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/plugin_object.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
#include "v8/include/v8.h"
using ppapi::NPObjectVar;
diff --git a/webkit/plugins/ppapi/ppb_video_capture_impl.cc b/webkit/plugins/ppapi/ppb_video_capture_impl.cc
index 466125c..f829425 100644
--- a/webkit/plugins/ppapi/ppb_video_capture_impl.cc
+++ b/webkit/plugins/ppapi/ppb_video_capture_impl.cc
@@ -13,13 +13,13 @@
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/shared_impl/ppapi_globals.h"
+#include "ppapi/shared_impl/resource_tracker.h"
#include "ppapi/thunk/enter.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/ppb_buffer_impl.h"
#include "webkit/plugins/ppapi/resource_helper.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
using ppapi::PpapiGlobals;
using ppapi::thunk::EnterResourceNoLock;
diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
index 95cbf08..b9e6da0 100644
--- a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
+++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc
@@ -15,7 +15,7 @@
#include "ppapi/c/dev/ppp_video_decoder_dev.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
-#include "webkit/plugins/ppapi/resource_helper.h"
+#include "ppapi/shared_impl/resource_tracker.h"
#include "ppapi/thunk/enter.h"
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/plugin_module.h"
@@ -23,7 +23,7 @@
#include "webkit/plugins/ppapi/ppb_buffer_impl.h"
#include "webkit/plugins/ppapi/ppb_context_3d_impl.h"
#include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
+#include "webkit/plugins/ppapi/resource_helper.h"
using ppapi::thunk::EnterResourceNoLock;
using ppapi::thunk::PPB_Buffer_API;
diff --git a/webkit/plugins/ppapi/quota_file_io.cc b/webkit/plugins/ppapi/quota_file_io.cc
index 8911dab..3a0630f 100644
--- a/webkit/plugins/ppapi/quota_file_io.cc
+++ b/webkit/plugins/ppapi/quota_file_io.cc
@@ -13,9 +13,9 @@
#include "base/stl_util.h"
#include "base/task.h"
#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/resource_helper.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
using base::PlatformFile;
using base::PlatformFileError;
diff --git a/webkit/plugins/ppapi/resource_helper.cc b/webkit/plugins/ppapi/resource_helper.cc
index cdea783..fd0321a 100644
--- a/webkit/plugins/ppapi/resource_helper.cc
+++ b/webkit/plugins/ppapi/resource_helper.cc
@@ -10,7 +10,7 @@
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
-#include "webkit/plugins/ppapi/resource_tracker.h"
+#include "webkit/plugins/ppapi/host_resource_tracker.h"
namespace webkit {
namespace ppapi {
@@ -18,8 +18,8 @@ namespace ppapi {
// static
PluginInstance* ResourceHelper::GetPluginInstance(
const ::ppapi::Resource* resource) {
- ResourceTracker* tracker = HostGlobals::Get()->host_resource_tracker();
- return tracker->GetInstance(resource->pp_instance());
+ return HostGlobals::Get()->host_resource_tracker()->GetInstance(
+ resource->pp_instance());
}
PluginModule* ResourceHelper::GetPluginModule(
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index ff8c757..71a7ea2 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -439,13 +439,13 @@
'../../plugins/npapi/plugin_list_unittest.cc',
'../../plugins/npapi/webplugin_impl_unittest.cc',
'../../plugins/ppapi/callbacks_unittest.cc',
+ '../../plugins/ppapi/host_resource_tracker_unittest.cc',
'../../plugins/ppapi/mock_plugin_delegate.cc',
'../../plugins/ppapi/mock_plugin_delegate.h',
'../../plugins/ppapi/mock_resource.h',
'../../plugins/ppapi/ppapi_unittest.cc',
'../../plugins/ppapi/ppapi_unittest.h',
'../../plugins/ppapi/quota_file_io_unittest.cc',
- '../../plugins/ppapi/resource_tracker_unittest.cc',
'../../plugins/ppapi/time_conversion_unittest.cc',
'../../plugins/ppapi/url_request_info_unittest.cc',
'../../quota/mock_quota_manager.cc',