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

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

Issue 10815073: Refactoring of new IPC-only pepper implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « ppapi/shared_impl/resource.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/plugin_module.h
diff --git a/webkit/plugins/ppapi/plugin_module.h b/webkit/plugins/ppapi/plugin_module.h
index 827546faccda02123164bac6ab45c337209844cd..7301723b355f94f59142662dce22fa002501e7c6 100644
--- a/webkit/plugins/ppapi/plugin_module.h
+++ b/webkit/plugins/ppapi/plugin_module.h
@@ -61,6 +61,14 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
PPP_ShutdownModuleFunc shutdown_module; // Optional, may be NULL.
};
+ // Allows the embedder to associate a class with this module. This is opaque
+ // from the PluginModule's perspective (see Set/GetEmbedderState below) but
+ // the module is in charge of deleting the class.
+ class EmbedderState {
+ public:
+ virtual ~EmbedderState() {}
+ };
+
typedef std::set<PluginInstance*> PluginInstanceSet;
// You must call one of the Init functions after the constructor to create a
@@ -76,6 +84,14 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
~PluginModule();
+ // Sets the given class as being associated with this module. It will be
+ // deleted when the module is destroyed. You can only set it once, subsequent
+ // sets will assert.
+ //
+ // See EmbedderState above for more.
+ void SetEmbedderState(scoped_ptr<EmbedderState> state);
+ EmbedderState* GetEmbedderState();
+
// Initializes this module as an internal plugin with the given entrypoints.
// This is used for "plugins" compiled into Chrome. Returns true on success.
// False means that the plugin can not be used.
@@ -163,6 +179,9 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
// Note: This may be null.
PluginDelegate::ModuleLifetime* lifetime_delegate_;
+ // See EmbedderState above.
+ scoped_ptr<EmbedderState> embedder_state_;
+
// Tracker for completion callbacks, used mainly to ensure that all callbacks
// are properly aborted on module shutdown.
scoped_refptr< ::ppapi::CallbackTracker> callback_tracker_;
« no previous file with comments | « ppapi/shared_impl/resource.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698