| 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);
|
| };
|
|
|
|
|