Chromium Code Reviews| Index: ppapi/shared_impl/resource_object_base.h |
| diff --git a/ppapi/shared_impl/resource_object_base.h b/ppapi/shared_impl/resource_object_base.h |
| index 8f5da77ebd644ec320128e60dacc12eb53e88bc2..8621974dc6bbdc1d51141207ad396f5d3d01be34 100644 |
| --- a/ppapi/shared_impl/resource_object_base.h |
| +++ b/ppapi/shared_impl/resource_object_base.h |
| @@ -8,6 +8,7 @@ |
| #include <stddef.h> // For NULL. |
| #include "base/memory/ref_counted.h" |
| +#include "ppapi/c/pp_instance.h" |
| #define FOR_ALL_PPAPI_RESOURCE_APIS(F) \ |
| F(PPB_AudioConfig_API) \ |
| @@ -55,8 +56,11 @@ FOR_ALL_PPAPI_RESOURCE_APIS(DECLARE_RESOURCE_CLASS) |
| class ResourceObjectBase : public base::RefCounted<ResourceObjectBase> { |
| public: |
| + ResourceObjectBase(PP_Instance instance); |
|
viettrungluu
2011/08/10 20:17:34
explicit
|
| virtual ~ResourceObjectBase(); |
| + PP_Instance pp_instance() const { return pp_instance_; } |
| + |
| // Dynamic casting for this object. Returns the pointer to the given type if |
| // Inheritance-based dynamic casting for this object. Returns the pointer to |
| // the given type if it's supported. Derived classes override the functions |
| @@ -68,6 +72,11 @@ class ResourceObjectBase : public base::RefCounted<ResourceObjectBase> { |
| // Template-based dynamic casting. See specializations below. |
| template <typename T> T* GetAs() { return NULL; } |
| + |
| + private: |
| + PP_Instance pp_instance_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ResourceObjectBase); |
|
viettrungluu
2011/08/10 20:17:34
DISALLOW_IMPLICIT_CONSTRUCTORS to disallow the def
|
| }; |
| // Template-based dynamic casting. These specializations forward to the |