Chromium Code Reviews| Index: chrome/renderer/pepper/ppb_nacl_private_impl.cc |
| =================================================================== |
| --- chrome/renderer/pepper/ppb_nacl_private_impl.cc (revision 154244) |
| +++ chrome/renderer/pepper/ppb_nacl_private_impl.cc (working copy) |
| @@ -42,6 +42,7 @@ |
| using webkit::ppapi::HostGlobals; |
| using webkit::ppapi::PluginInstance; |
| using webkit::ppapi::PluginDelegate; |
| +using webkit::ppapi::PluginModule; |
| using WebKit::WebView; |
| namespace { |
| @@ -207,7 +208,7 @@ |
| IPC::ChannelHandle channel_handle = it->second; |
| map.erase(it); |
| - webkit::ppapi::PluginInstance* plugin_instance = |
| + PluginInstance* plugin_instance = |
| content::GetHostGlobals()->GetInstance(instance); |
| if (!plugin_instance) |
| return PP_FALSE; |
| @@ -216,18 +217,24 @@ |
| plugin_instance->container()->element().document().frame()->view(); |
| RenderView* render_view = content::RenderView::FromWebView(web_view); |
| - webkit::ppapi::PluginModule* plugin_module = plugin_instance->module(); |
| + PluginModule* plugin_module = plugin_instance->module(); |
| scoped_refptr<SyncMessageStatusReceiver> |
| status_receiver(new SyncMessageStatusReceiver()); |
| scoped_ptr<OutOfProcessProxy> out_of_process_proxy(new OutOfProcessProxy); |
| + // Create a new module for each instance of the NaCl plugin that is using |
| + // the IPC based out-of-process proxy. This allows the built-in NaCl plugin |
| + // to create additional instances. |
|
dmichael (off chromium)
2012/09/04 21:21:33
Could you elaborate more as to why new instances c
bbudge
2012/09/05 19:15:48
Done.
|
| + scoped_refptr<PluginModule> nacl_plugin_module( |
| + plugin_module->CreateModuleForNaClInstance()); |
| + |
| if (out_of_process_proxy->Init( |
| channel_handle, |
| - plugin_module->pp_module(), |
| - webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(), |
| + nacl_plugin_module->pp_module(), |
| + PluginModule::GetLocalGetInterfaceFunc(), |
| ppapi::Preferences(render_view->GetWebkitPreferences()), |
| status_receiver.get())) { |
| - plugin_module->InitAsProxiedNaCl( |
| + nacl_plugin_module->InitAsProxiedNaCl( |
| out_of_process_proxy.PassAs<PluginDelegate::OutOfProcessProxy>(), |
| instance); |
| return PP_TRUE; |