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

Unified Diff: ppapi/proxy/plugin_dispatcher.h

Issue 6286070: Remove all uses of the global Dispatcher Get function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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: ppapi/proxy/plugin_dispatcher.h
===================================================================
--- ppapi/proxy/plugin_dispatcher.h (revision 73960)
+++ ppapi/proxy/plugin_dispatcher.h (working copy)
@@ -41,23 +41,13 @@
ShutdownModuleFunc shutdown_module);
~PluginDispatcher();
- // 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;
@@ -75,13 +65,20 @@
InstanceData* GetInstanceData(PP_Instance instance);
private:
+ friend class PluginDispatcherTest;
+
// IPC message handlers.
void OnMsgInitializeModule(PP_Module pp_module, bool* result);
void OnMsgShutdown();
+ void OnMsgSupportsInterface(const std::string& interface_name, bool* result);
InitModuleFunc init_module_;
ShutdownModuleFunc shutdown_module_;
+ // All target proxies currently created. These are ones that receive
+ // messages.
+ scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT];
+
typedef base::hash_map<PP_Instance, InstanceData> InstanceDataMap;
InstanceDataMap instance_map_;

Powered by Google App Engine
This is Rietveld 408576698