| Index: ppapi/shared_impl/var_tracker.h
|
| diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h
|
| index 9ab22f2d02a00a3aac785473cbcd82562efe3dab..c06f83c0c941daee7ea171de4335e316768913d0 100644
|
| --- a/ppapi/shared_impl/var_tracker.h
|
| +++ b/ppapi/shared_impl/var_tracker.h
|
| @@ -20,6 +20,10 @@ namespace ppapi {
|
| class ArrayBufferVar;
|
| class Var;
|
|
|
| +namespace proxy {
|
| +class Dispatcher;
|
| +}
|
| +
|
| // Tracks non-POD (refcounted) var objects held by a plugin.
|
| //
|
| // The tricky part is the concept of a "tracked object". These are only
|
| @@ -84,6 +88,38 @@ class PPAPI_SHARED_EXPORT VarTracker
|
| int GetRefCountForObject(const PP_Var& object);
|
| int GetTrackedWithNoReferenceCountForObject(const PP_Var& object);
|
|
|
| + // Manages tracking for receiving a VARTYPE_OBJECT from the remote side
|
| + // (either the plugin or the renderer) that has already had its reference
|
| + // count incremented on behalf of the caller.
|
| + virtual PP_Var ReceiveObjectPassRef(const PP_Var& var,
|
| + proxy::Dispatcher* dispatcher) {
|
| + return PP_Var();
|
| + }
|
| +
|
| + // See the comment in var_tracker.h for more about what a tracked object is.
|
| + // This adds and releases the "track_with_no_reference_count" for a given
|
| + // object.
|
| + virtual PP_Var TrackObjectWithNoReference(const PP_Var& host_var,
|
| + proxy::Dispatcher* dispatcher) {
|
| + return PP_Var();
|
| + }
|
| +
|
| + virtual void StopTrackingObjectWithNoReference(const PP_Var& plugin_var) { }
|
| +
|
| + // Returns the host var for the corresponding plugin object var. The object
|
| + // should be a VARTYPE_OBJECT. The reference count is not affeceted.
|
| + virtual PP_Var GetHostObject(const PP_Var& plugin_object) const {
|
| + return PP_Var();
|
| + }
|
| +
|
| + virtual proxy::Dispatcher* DispatcherForPluginObject(
|
| + const PP_Var& plugin_object) const { return NULL; }
|
| +
|
| + // Like Release() but the var is identified by its host object ID (as
|
| + // returned by GetHostObject).
|
| + void ReleaseHostObject(proxy::Dispatcher* dispatcher,
|
| + const PP_Var& host_object) {}
|
| +
|
| protected:
|
| struct VarInfo {
|
| VarInfo();
|
|
|