Chromium Code Reviews| Index: ppapi/shared_impl/var.h |
| diff --git a/ppapi/shared_impl/var.h b/ppapi/shared_impl/var.h |
| index 988898a0b4c17476a5256479ac2da9da6c22b8e2..a6c18be0f9276c8032b04304c6712ec396629e25 100644 |
| --- a/ppapi/shared_impl/var.h |
| +++ b/ppapi/shared_impl/var.h |
| @@ -17,6 +17,7 @@ namespace ppapi { |
| class NPObjectVar; |
| class ProxyObjectVar; |
| class StringVar; |
| +class VarTracker; |
| // Var ------------------------------------------------------------------------- |
| @@ -48,6 +49,8 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> { |
| int32 GetExistingVarID() const; |
| protected: |
| + friend class VarTracker; |
| + |
| Var(); |
| // Returns the unique ID associated with this string or object, creating it |
| @@ -62,6 +65,9 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> { |
| // before. This is used in cases where the ID is generated externally. |
| void AssignVarID(int32 id); |
| + // Reset the assigned object ID. |
| + void ResetVarID(void) { AssignVarID(0); }; |
|
dmichael (off chromium)
2011/12/13 15:34:32
nit: We don't normally put 'void' in the parameter
|
| + |
| private: |
| // This will be 0 if no ID has been assigned (this happens lazily). |
| int32 var_id_; |