Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Unified Diff: webkit/plugins/npapi/webplugin_impl.h

Issue 15007012: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing includes. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/plugins/npapi/webplugin_impl.h
diff --git a/webkit/plugins/npapi/webplugin_impl.h b/webkit/plugins/npapi/webplugin_impl.h
index 20917d0b4c5474c584702bd48589b30afdc0caf9..406bc2e548fd6cc4481f01e7717d071f61269692 100644
--- a/webkit/plugins/npapi/webplugin_impl.h
+++ b/webkit/plugins/npapi/webplugin_impl.h
@@ -20,6 +20,7 @@
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
+#include "third_party/npapi/bindings/npruntime.h"
#include "ui/gfx/native_widget_types.h"
#include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/webkit_plugins_export.h"
@@ -75,6 +76,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginImpl :
WebKit::WebPluginContainer* container);
virtual void destroy();
virtual NPObject* scriptableObject();
+ virtual NPP pluginNPP();
virtual bool getFormValue(WebKit::WebString& value);
virtual void paint(
WebKit::WebCanvas* canvas, const WebKit::WebRect& paint_rect);
@@ -292,6 +294,9 @@ class WEBKIT_PLUGINS_EXPORT WebPluginImpl :
// This is just a weak reference.
WebKit::WebPluginContainer* container_;
+ // Unique identifier for this plugin, used to track script objects.
+ NPP npp_;
+
typedef std::map<WebPluginResourceClient*,
webkit_glue::MultipartResponseDelegate*>
MultiPartResponseHandlerMap;

Powered by Google App Engine
This is Rietveld 408576698