| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_OBJECT_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PLUGIN_OBJECT_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_OBJECT_H_ | 6 #define CONTENT_RENDERER_PEPPER_PLUGIN_OBJECT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class PluginObject : public gin::Wrappable<PluginObject>, | 31 class PluginObject : public gin::Wrappable<PluginObject>, |
| 32 public gin::NamedPropertyInterceptor { | 32 public gin::NamedPropertyInterceptor { |
| 33 public: | 33 public: |
| 34 static gin::WrapperInfo kWrapperInfo; | 34 static gin::WrapperInfo kWrapperInfo; |
| 35 | 35 |
| 36 ~PluginObject() override; | 36 ~PluginObject() override; |
| 37 | 37 |
| 38 // Returns the PluginObject which is contained in the given v8 object, or NULL | 38 // Returns the PluginObject which is contained in the given v8 object, or NULL |
| 39 // if the object isn't backed by a PluginObject. | 39 // if the object isn't backed by a PluginObject. |
| 40 static PluginObject* FromV8Object(v8::Isolate* isolate, | 40 static PluginObject* FromV8Object(v8::Isolate* isolate, |
| 41 v8::Handle<v8::Object> v8_object); | 41 v8::Local<v8::Object> v8_object); |
| 42 | 42 |
| 43 // Allocates a new PluginObject and returns it as a PP_Var with a | 43 // Allocates a new PluginObject and returns it as a PP_Var with a |
| 44 // refcount of 1. | 44 // refcount of 1. |
| 45 static PP_Var Create(PepperPluginInstanceImpl* instance, | 45 static PP_Var Create(PepperPluginInstanceImpl* instance, |
| 46 const PPP_Class_Deprecated* ppp_class, | 46 const PPP_Class_Deprecated* ppp_class, |
| 47 void* ppp_class_data); | 47 void* ppp_class_data); |
| 48 | 48 |
| 49 // gin::NamedPropertyInterceptor | 49 // gin::NamedPropertyInterceptor |
| 50 v8::Local<v8::Value> GetNamedProperty(v8::Isolate* isolate, | 50 v8::Local<v8::Value> GetNamedProperty(v8::Isolate* isolate, |
| 51 const std::string& property) override; | 51 const std::string& property) override; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 v8::StdGlobalValueMap<std::string, v8::FunctionTemplate> template_cache_; | 87 v8::StdGlobalValueMap<std::string, v8::FunctionTemplate> template_cache_; |
| 88 | 88 |
| 89 base::WeakPtrFactory<PluginObject> weak_factory_; | 89 base::WeakPtrFactory<PluginObject> weak_factory_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(PluginObject); | 91 DISALLOW_COPY_AND_ASSIGN(PluginObject); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace content | 94 } // namespace content |
| 95 | 95 |
| 96 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_OBJECT_H_ | 96 #endif // CONTENT_RENDERER_PEPPER_PLUGIN_OBJECT_H_ |
| OLD | NEW |