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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 15941006: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CppBoundClass. 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
« no previous file with comments | « webkit/plugins/ppapi/plugin_object.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.h
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index 07f36576e89c4612507472eae432a7cf0620a031..3053a8a582a1ad6b6232b1cc411e55fc0e69340a 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -58,6 +58,7 @@
#include "webkit/plugins/webkit_plugins_export.h"
struct PP_Point;
+struct _NPP;
class SkBitmap;
class TransportDIB;
@@ -502,6 +503,10 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
// the given module.
bool IsValidInstanceOf(PluginModule* module);
+ // Returns the plugin NPP identifier that this plugin will use to identify
+ // itself when making NPObject scripting calls to WebBindings.
+ struct _NPP* instanceNPP();
+
private:
friend class PpapiUnittest;
@@ -834,6 +839,10 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance :
// calls and handles PPB_ContentDecryptor_Private calls.
scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_;
+ // Dummy NPP value used when calling in to WebBindings, to allow the bindings
+ // to correctly track NPObjects belonging to this plugin instance.
+ scoped_ptr<struct _NPP> npp_;
+
friend class PpapiPluginInstanceTest;
DISALLOW_COPY_AND_ASSIGN(PluginInstance);
};
« no previous file with comments | « webkit/plugins/ppapi/plugin_object.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698