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

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

Issue 10069035: Add a way to implement GetInterface in the broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) = 0; 60 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) = 0;
61 virtual void Unregister(uint32 plugin_dispatcher_id) = 0; 61 virtual void Unregister(uint32 plugin_dispatcher_id) = 0;
62 }; 62 };
63 63
64 // Constructor for the plugin side. The init and shutdown functions will be 64 // Constructor for the plugin side. The init and shutdown functions will be
65 // will be automatically called when requested by the renderer side. The 65 // will be automatically called when requested by the renderer side. The
66 // module ID will be set upon receipt of the InitializeModule message. 66 // module ID will be set upon receipt of the InitializeModule message.
67 // 67 //
68 // You must call InitPluginWithChannel after the constructor. 68 // You must call InitPluginWithChannel after the constructor.
69 PluginDispatcher(base::ProcessHandle remote_process_handle, 69 PluginDispatcher(base::ProcessHandle remote_process_handle,
70 GetInterfaceFunc get_interface); 70 PP_GetInterface_Func get_interface);
71 virtual ~PluginDispatcher(); 71 virtual ~PluginDispatcher();
72 72
73 // The plugin side maintains a mapping from PP_Instance to Dispatcher so 73 // The plugin side maintains a mapping from PP_Instance to Dispatcher so
74 // that we can send the messages to the right channel if there are multiple 74 // that we can send the messages to the right channel if there are multiple
75 // renderers sharing the same plugin. This mapping is maintained by 75 // renderers sharing the same plugin. This mapping is maintained by
76 // DidCreateInstance/DidDestroyInstance. 76 // DidCreateInstance/DidDestroyInstance.
77 static PluginDispatcher* GetForInstance(PP_Instance instance); 77 static PluginDispatcher* GetForInstance(PP_Instance instance);
78 78
79 // Same as GetForInstance but retrieves the instance from the given resource 79 // Same as GetForInstance but retrieves the instance from the given resource
80 // object as a convenience. Returns NULL on failure. 80 // object as a convenience. Returns NULL on failure.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 uint32 plugin_dispatcher_id_; 160 uint32 plugin_dispatcher_id_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher); 162 DISALLOW_COPY_AND_ASSIGN(PluginDispatcher);
163 }; 163 };
164 164
165 } // namespace proxy 165 } // namespace proxy
166 } // namespace ppapi 166 } // namespace ppapi
167 167
168 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_ 168 #endif // PPAPI_PROXY_PLUGIN_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698