diff options
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/pepper_resource.cc | 7 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_resource.h | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_resource_tracker.cc | 7 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_resource_tracker.h | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin.cc | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin.h | 1 |
6 files changed, 22 insertions, 4 deletions
diff --git a/webkit/glue/plugins/pepper_resource.cc b/webkit/glue/plugins/pepper_resource.cc index b17fc31..cf7a7fe 100644 --- a/webkit/glue/plugins/pepper_resource.cc +++ b/webkit/glue/plugins/pepper_resource.cc @@ -9,6 +9,13 @@ namespace pepper { +Resource::Resource(PluginModule* module) + : resource_id_(0), module_(module) { +} + +Resource::~Resource() { +} + PP_Resource Resource::GetReference() { ResourceTracker *tracker = ResourceTracker::Get(); if (resource_id_) diff --git a/webkit/glue/plugins/pepper_resource.h b/webkit/glue/plugins/pepper_resource.h index 3bad113..cab6f32 100644 --- a/webkit/glue/plugins/pepper_resource.h +++ b/webkit/glue/plugins/pepper_resource.h @@ -38,8 +38,8 @@ class Widget; class Resource : public base::RefCountedThreadSafe<Resource> { public: - explicit Resource(PluginModule* module) : resource_id_(0), module_(module) {} - virtual ~Resource() {} + explicit Resource(PluginModule* module); + virtual ~Resource(); // Returns NULL if the resource is invalid or is a different type. template<typename T> diff --git a/webkit/glue/plugins/pepper_resource_tracker.cc b/webkit/glue/plugins/pepper_resource_tracker.cc index 869874e..9ee54f8 100644 --- a/webkit/glue/plugins/pepper_resource_tracker.cc +++ b/webkit/glue/plugins/pepper_resource_tracker.cc @@ -21,6 +21,13 @@ scoped_refptr<Resource> ResourceTracker::GetResource(PP_Resource res) const { return result->second.first; } +ResourceTracker::ResourceTracker() + : last_id_(0) { +} + +ResourceTracker::~ResourceTracker() { +} + PP_Resource ResourceTracker::AddResource(Resource* resource) { // If the plugin manages to create 4B resources... if (last_id_ == std::numeric_limits<PP_Resource>::max()) { diff --git a/webkit/glue/plugins/pepper_resource_tracker.h b/webkit/glue/plugins/pepper_resource_tracker.h index 20ba6db..59f02d2 100644 --- a/webkit/glue/plugins/pepper_resource_tracker.h +++ b/webkit/glue/plugins/pepper_resource_tracker.h @@ -53,8 +53,8 @@ class ResourceTracker { friend class Resource; // Prohibit creation other then by the Singleton class. - ResourceTracker() : last_id_(0) {} - ~ResourceTracker() {} + ResourceTracker(); + ~ResourceTracker(); // Adds the given resource to the tracker and assigns it a resource ID and // refcount of 1. The assigned resource ID will be returned. Used only by the diff --git a/webkit/glue/plugins/webplugin.cc b/webkit/glue/plugins/webplugin.cc index 6443318..18f722b 100644 --- a/webkit/glue/plugins/webplugin.cc +++ b/webkit/glue/plugins/webplugin.cc @@ -12,6 +12,9 @@ WebPluginGeometry::WebPluginGeometry() visible(false) { } +WebPluginGeometry::~WebPluginGeometry() { +} + bool WebPluginGeometry::Equals(const WebPluginGeometry& rhs) const { return window == rhs.window && window_rect == rhs.window_rect && diff --git a/webkit/glue/plugins/webplugin.h b/webkit/glue/plugins/webplugin.h index 1813842..19c6cb0 100644 --- a/webkit/glue/plugins/webplugin.h +++ b/webkit/glue/plugins/webplugin.h @@ -33,6 +33,7 @@ class WebPluginResourceClient; // Describes the new location for a plugin window. struct WebPluginGeometry { WebPluginGeometry(); + ~WebPluginGeometry(); bool Equals(const WebPluginGeometry& rhs) const; |