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

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

Issue 7578001: Unify var tracking between webkit and the proxy. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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/ppb_var_impl.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
===================================================================
--- webkit/plugins/ppapi/resource_tracker.h (revision 96002)
+++ webkit/plugins/ppapi/resource_tracker.h (working copy)
@@ -21,6 +21,7 @@
#include "ppapi/proxy/interface_id.h"
#include "ppapi/shared_impl/function_group_base.h"
#include "ppapi/shared_impl/tracker_base.h"
+#include "ppapi/shared_impl/var_tracker.h"
typedef struct NPObject NPObject;
@@ -63,22 +64,17 @@
// Returns the number of resources associated with this module.
uint32 GetLiveObjectsForInstance(PP_Instance instance) const;
- // ResourceTrackerBase.
+ // TrackerBase.
virtual ::ppapi::ResourceObjectBase* GetResourceAPI(
PP_Resource res) OVERRIDE;
virtual ::ppapi::FunctionGroupBase* GetFunctionAPI(
PP_Instance pp_instance,
pp::proxy::InterfaceID id) OVERRIDE;
virtual PP_Instance GetInstanceForResource(PP_Resource resource) OVERRIDE;
+ virtual ::ppapi::VarTracker* GetVarTracker() OVERRIDE;
// PP_Vars -------------------------------------------------------------------
- // TrackerBase implementation.
- virtual int32 AddVar(::ppapi::Var* var) OVERRIDE;
- virtual scoped_refptr< ::ppapi::Var > GetVar(int32 var_id) const OVERRIDE;
- virtual bool AddRefVar(int32 var_id) OVERRIDE;
- virtual bool UnrefVar(int32 var_id) OVERRIDE;
-
// Tracks all live NPObjectVar. This is so we can map between instance +
// NPObject and get the NPObjectVar corresponding to it. This Add/Remove
// function is called by the NPObjectVar when it is created and
@@ -182,10 +178,11 @@
// See SetSingletonOverride above.
static ResourceTracker* singleton_override_;
- // Last assigned resource & var ID.
+ // Last assigned resource ID.
PP_Resource last_resource_id_;
- int32 last_var_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
« no previous file with comments | « webkit/plugins/ppapi/ppb_var_impl.cc ('k') | webkit/plugins/ppapi/resource_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698