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

Side by Side Diff: ppapi/proxy/plugin_dispatcher.h

Issue 10378057: Broker out PPAPI handle duplication (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/host_dispatcher.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 5 #ifndef PPAPI_PROXY_PLUGIN_DISPATCHER_H_
6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 6 #define PPAPI_PROXY_PLUGIN_DISPATCHER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Each call to Register() has to be matched with a call to Unregister(). 63 // Each call to Register() has to be matched with a call to Unregister().
64 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) = 0; 64 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) = 0;
65 virtual void Unregister(uint32 plugin_dispatcher_id) = 0; 65 virtual void Unregister(uint32 plugin_dispatcher_id) = 0;
66 }; 66 };
67 67
68 // Constructor for the plugin side. The init and shutdown functions will be 68 // Constructor for the plugin side. The init and shutdown functions will be
69 // will be automatically called when requested by the renderer side. The 69 // will be automatically called when requested by the renderer side. The
70 // module ID will be set upon receipt of the InitializeModule message. 70 // module ID will be set upon receipt of the InitializeModule message.
71 // 71 //
72 // You must call InitPluginWithChannel after the constructor. 72 // You must call InitPluginWithChannel after the constructor.
73 PluginDispatcher(base::ProcessHandle remote_process_handle, 73 PluginDispatcher(PP_GetInterface_Func get_interface,
74 PP_GetInterface_Func get_interface,
75 bool incognito); 74 bool incognito);
76 virtual ~PluginDispatcher(); 75 virtual ~PluginDispatcher();
77 76
78 // The plugin side maintains a mapping from PP_Instance to Dispatcher so 77 // The plugin side maintains a mapping from PP_Instance to Dispatcher so
79 // that we can send the messages to the right channel if there are multiple 78 // that we can send the messages to the right channel if there are multiple
80 // renderers sharing the same plugin. This mapping is maintained by 79 // renderers sharing the same plugin. This mapping is maintained by
81 // DidCreateInstance/DidDestroyInstance. 80 // DidCreateInstance/DidDestroyInstance.
82 static PluginDispatcher* GetForInstance(PP_Instance instance); 81 static PluginDispatcher* GetForInstance(PP_Instance instance);
83 82
84 // Same as GetForInstance but retrieves the instance from the given resource 83 // Same as GetForInstance but retrieves the instance from the given resource
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // incognito mode. 167 // incognito mode.
169 bool incognito_; 168 bool incognito_;
170 169
171 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); 170 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher);
172 }; 171 };
173 172
174 } // namespace proxy 173 } // namespace proxy
175 } // namespace ppapi 174 } // namespace ppapi
176 175
177 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 176 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/host_dispatcher.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698