Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: webkit/plugins/ppapi/resource_tracker.h

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nulls auditeed Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/resource_helper.cc ('k') | webkit/plugins/ppapi/resource_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/resource_tracker.h
diff --git a/webkit/plugins/ppapi/resource_tracker.h b/webkit/plugins/ppapi/resource_tracker.h
index 4802fab029cc1b7f976aa652ecc6897628f467bf..52ddf10c25262ab1eaef34827fa73613f1ed4ce8 100644
--- a/webkit/plugins/ppapi/resource_tracker.h
+++ b/webkit/plugins/ppapi/resource_tracker.h
@@ -36,7 +36,6 @@ namespace ppapi {
class PluginInstance;
class PluginModule;
-class Resource;
class ResourceTrackerTest;
// This class maintains a global list of all live pepper resources. It allows
@@ -58,6 +57,9 @@ class ResourceTracker : public ::ppapi::TrackerBase,
virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE;
virtual ::ppapi::ResourceTracker* GetResourceTracker() OVERRIDE;
+ // ppapi::ResourceTracker overrides.
+ virtual void LastPluginRefWasDeleted(::ppapi::Resource* object) OVERRIDE;
+
// PP_Vars -------------------------------------------------------------------
// Tracks all live NPObjectVar. This is so we can map between instance +
@@ -109,7 +111,6 @@ class ResourceTracker : public ::ppapi::TrackerBase,
PluginInstance* GetInstance(PP_Instance instance);
private:
- friend class Resource;
friend class ResourceTrackerTest;
typedef std::set<PP_Resource> ResourceSet;
@@ -155,22 +156,8 @@ class ResourceTracker : public ::ppapi::TrackerBase,
// See SetSingletonOverride above.
static ResourceTracker* singleton_override_;
- // Last assigned resource ID.
- PP_Resource last_resource_id_;
-
::ppapi::VarTracker var_tracker_;
- // For each PP_Resource, keep the Resource* (as refptr) and plugin use count.
- // This use count is different then Resource's RefCount, and is manipulated
- // using this AddRefResource/UnrefResource. When it drops to zero, we just
- // remove the resource from this resource tracker, but the resource object
- // will be alive so long as some scoped_refptr still holds it's
- // reference. This prevents plugins from forcing destruction of Resource
- // objects.
- typedef std::pair<scoped_refptr<Resource>, size_t> ResourceAndRefCount;
- typedef base::hash_map<PP_Resource, ResourceAndRefCount> ResourceMap;
- ResourceMap live_resources_;
-
// Like ResourceAndRefCount but for vars, which are associated with modules.
typedef std::pair<scoped_refptr< ::ppapi::Var>, size_t> VarAndRefCount;
typedef base::hash_map<int32, VarAndRefCount> VarMap;
« no previous file with comments | « webkit/plugins/ppapi/resource_helper.cc ('k') | webkit/plugins/ppapi/resource_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698