Index: webkit/plugins/ppapi/var_object_class.h |
=================================================================== |
--- webkit/plugins/ppapi/var_object_class.h (revision 0) |
+++ webkit/plugins/ppapi/var_object_class.h (working copy) |
@@ -2,17 +2,20 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef WEBKIT_GLUE_PLUGINS_PEPPER_CLASS_H_ |
-#define WEBKIT_GLUE_PLUGINS_PEPPER_CLASS_H_ |
+#ifndef WEBKIT_PLUGINS_PPAPI_CLASS_H_ |
+#define WEBKIT_PLUGINS_PPAPI_CLASS_H_ |
-#include "webkit/glue/plugins/pepper_resource.h" |
+#include "webkit/plugins/ppapi/resource.h" |
#include <string> |
#include "base/hash_tables.h" |
+#include "base/ref_counted.h" |
#include "ppapi/c/ppb_class.h" |
+#include "third_party/npapi/bindings/npruntime.h" |
-namespace pepper { |
+namespace webkit { |
+namespace ppapi { |
class PluginModule; |
@@ -28,20 +31,27 @@ |
const bool enumerable; |
}; |
+ struct InstanceData : public NPObject { |
+ InstanceData(); |
+ |
+ scoped_refptr<VarObjectClass> object_class; |
+ void* native_data; |
+ }; |
+ |
struct InstanceData; |
typedef base::hash_map<std::string, Property> PropertyMap; |
- // Returns the PPB_Var interface for the plugin to use. |
- static const PPB_Class* GetInterface(); |
- |
VarObjectClass(PluginModule* module, PP_ClassDestructor destruct, |
PP_ClassFunction invoke, PP_ClassProperty* properties); |
virtual ~VarObjectClass(); |
// Resource override. |
- virtual VarObjectClass* AsVarObjectClass() { return this; } |
+ virtual VarObjectClass* AsVarObjectClass(); |
+ // Returns the PPB_Var interface for the plugin to use. |
+ static const PPB_Class* GetInterface(); |
+ |
const PropertyMap &properties() const { return properties_; } |
PP_ClassDestructor instance_native_destructor() { |
@@ -60,7 +70,8 @@ |
DISALLOW_COPY_AND_ASSIGN(VarObjectClass); |
}; |
-} // namespace pepper |
+} // namespace ppapi |
+} // namespace webkit |
-#endif // WEBKIT_GLUE_PLUGINS_PEPPER_CLASS_H_ |
+#endif // WEBKIT_PLUGINS_PPAPI_CLASS_H_ |