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

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: Fix self-assignment 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
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..c28661f53cda55d3401e8c1a950bc1b22cfb102c 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
@@ -109,7 +108,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 +153,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;

Powered by Google App Engine
This is Rietveld 408576698