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

Unified Diff: ppapi/proxy/plugin_dispatcher.h

Issue 6282007: First pass at making the proxy handle multiple renderers. This associates the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/proxy/image_data.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_dispatcher.h
===================================================================
--- ppapi/proxy/plugin_dispatcher.h (revision 71973)
+++ ppapi/proxy/plugin_dispatcher.h (working copy)
@@ -9,10 +9,8 @@
#include "base/process.h"
#include "base/scoped_ptr.h"
-#include "ppapi/proxy/callback_tracker.h"
+#include "ppapi/c/pp_instance.h"
#include "ppapi/proxy/dispatcher.h"
-#include "ppapi/proxy/plugin_resource_tracker.h"
-#include "ppapi/proxy/plugin_var_tracker.h"
class MessageLoop;
@@ -36,30 +34,30 @@
ShutdownModuleFunc shutdown_module);
~PluginDispatcher();
- // The plugin maintains a global Dispatcher pointer. There is only one since
- // there is only one connection to the browser. Don't call this on the
- // browser side, see GetForInstnace.
+ // Sets/gets the global dispatcher pointer. New code should use the
+ // GetForInstance version below, this is currently here as a stopgap while
+ // the transition is being made.
+ //
+ // TODO(brettw) remove this.
static PluginDispatcher* Get();
static void SetGlobal(PluginDispatcher* dispatcher);
+ // The plugin side maintains a mapping from PP_Instance to Dispatcher so
+ // that we can send the messages to the right channel if there are multiple
+ // renderers sharing the same plugin.
+ static PluginDispatcher* GetForInstance(PP_Instance instance);
+ /* TODO(brettw) enable this when Get() is removed.
+ static void SetForInstance(PP_Instance instance,
+ PluginDispatcher* dispatcher);
+ static void RemoveForInstance(PP_Instance instance);
+ */
+
// Dispatcher overrides.
virtual bool IsPlugin() const;
// IPC::Channel::Listener implementation.
virtual bool OnMessageReceived(const IPC::Message& msg);
- // Returns the resource tracker for the plugin. In the browser process this
- // will return NULL.
- PluginResourceTracker* plugin_resource_tracker() {
- return plugin_resource_tracker_.get();
- }
-
- // Returns the var tracker for the plugin. In the browser process this
- // will return NULL.
- PluginVarTracker* plugin_var_tracker() {
- return plugin_var_tracker_.get();
- }
-
private:
// IPC message handlers.
void OnMsgInitializeModule(PP_Module pp_module, bool* result);
@@ -68,9 +66,6 @@
InitModuleFunc init_module_;
ShutdownModuleFunc shutdown_module_;
- scoped_ptr<PluginResourceTracker> plugin_resource_tracker_;
- scoped_ptr<PluginVarTracker> plugin_var_tracker_;
-
DISALLOW_COPY_AND_ASSIGN(PluginDispatcher);
};
« no previous file with comments | « ppapi/proxy/image_data.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698