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

Side by Side Diff: webkit/plugins/ppapi/plugin_module.h

Issue 10912060: Allow the NaCl IPC proxy to support multiple instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | « chrome/renderer/pepper/ppb_nacl_private_impl.cc ('k') | webkit/plugins/ppapi/plugin_module.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 WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 bool InitAsInternalPlugin(const EntryPoints& entry_points); 98 bool InitAsInternalPlugin(const EntryPoints& entry_points);
99 99
100 // Initializes this module using the given library path as the plugin. 100 // Initializes this module using the given library path as the plugin.
101 // Returns true on success. False means that the plugin can not be used. 101 // Returns true on success. False means that the plugin can not be used.
102 bool InitAsLibrary(const FilePath& path); 102 bool InitAsLibrary(const FilePath& path);
103 103
104 // Initializes this module for the given out of process proxy. This takes 104 // Initializes this module for the given out of process proxy. This takes
105 // ownership of the given pointer, even in the failure case. 105 // ownership of the given pointer, even in the failure case.
106 void InitAsProxied(PluginDelegate::OutOfProcessProxy* out_of_process_proxy); 106 void InitAsProxied(PluginDelegate::OutOfProcessProxy* out_of_process_proxy);
107 107
108 // Initializes this module for the given NaCl proxy. This takes 108 // Creates a new module for a NaCl instance that will be using the IPC proxy.
109 // We can't use the existing module, or new instances of the plugin can't
110 // be created.
111 scoped_refptr<PluginModule> CreateModuleForNaClInstance();
112
113 // Initializes the NaCl module for the given out of process proxy. This takes
109 // ownership of the given pointer, even in the failure case. 114 // ownership of the given pointer, even in the failure case.
110 void InitAsProxiedNaCl( 115 void InitAsProxiedNaCl(
111 scoped_ptr<PluginDelegate::OutOfProcessProxy> out_of_process_proxy, 116 scoped_ptr<PluginDelegate::OutOfProcessProxy> out_of_process_proxy,
112 PP_Instance instance); 117 PP_Instance instance);
113 118
114 static const PPB_Core* GetCore(); 119 static const PPB_Core* GetCore();
115 120
116 // Returns a pointer to the local GetInterface function for retrieving 121 // Returns a pointer to the local GetInterface function for retrieving
117 // PPB interfaces. 122 // PPB interfaces.
118 static GetInterfaceFunc GetLocalGetInterfaceFunc(); 123 static GetInterfaceFunc GetLocalGetInterfaceFunc();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 const FilePath path_; 232 const FilePath path_;
228 233
229 ::ppapi::PpapiPermissions permissions_; 234 ::ppapi::PpapiPermissions permissions_;
230 235
231 // Non-owning pointers to all instances associated with this module. When 236 // Non-owning pointers to all instances associated with this module. When
232 // there are no more instances, this object should be deleted. 237 // there are no more instances, this object should be deleted.
233 PluginInstanceSet instances_; 238 PluginInstanceSet instances_;
234 239
235 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance); 240 PP_Bool (*reserve_instance_id_)(PP_Module, PP_Instance);
236 241
237 bool nacl_ipc_proxy_;
238
239 DISALLOW_COPY_AND_ASSIGN(PluginModule); 242 DISALLOW_COPY_AND_ASSIGN(PluginModule);
240 }; 243 };
241 244
242 } // namespace ppapi 245 } // namespace ppapi
243 } // namespace webkit 246 } // namespace webkit
244 247
245 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_ 248 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_MODULE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/pepper/ppb_nacl_private_impl.cc ('k') | webkit/plugins/ppapi/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698