| 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..34085255a4e52ecc1ab5f4da2e2e66f0f1d33aac 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);
|
| 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_IMPLICIT_CONSTRUCTORS(ResourceObjectBase);
|
| };
|
|
|
| // Template-based dynamic casting. These specializations forward to the
|
|
|