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

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 forward-define. 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..6256aafaca9ca2af852fa32b811cde99b8be22cf 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"
jamesr 2013/05/21 18:20:21 the NPP type is in npapi.h, please just include th
Wez 2013/05/22 06:55:25 Done.
#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 struct _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