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

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11140046: Add a content API to connect a Native Client module to an out-of-process PPAPI proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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: content/renderer/pepper/pepper_plugin_delegate_impl.cc
===================================================================
--- content/renderer/pepper/pepper_plugin_delegate_impl.cc (revision 162107)
+++ content/renderer/pepper/pepper_plugin_delegate_impl.cc (working copy)
@@ -414,6 +414,40 @@
return module;
}
+RendererPpapiHost* PepperPluginDelegateImpl::CreateExternalPluginModule(
+ scoped_refptr<webkit::ppapi::PluginModule> plugin_module,
+ const FilePath& file_path,
+ ppapi::PpapiPermissions permissions,
+ const IPC::ChannelHandle& channel_handle,
+ int child_process_id) {
+ scoped_refptr<PepperHungPluginFilter> hung_filter(
brettw 2012/10/16 23:37:32 This code is just copied and pasted from the previ
bbudge 2012/10/17 00:18:44 Done. Good eye.
+ new PepperHungPluginFilter(file_path,
+ render_view_->routing_id(),
+ child_process_id));
+ // Create a new HostDispatcher for the proxy, and hook it up to the
+ // plugin module.
+ scoped_ptr<HostDispatcherWrapper> dispatcher(
+ new HostDispatcherWrapper(plugin_module,
+ child_process_id,
+ permissions));
+ if (!dispatcher->Init(
+ channel_handle,
+ webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(),
+ GetPreferences(),
+ permissions,
+ hung_filter.get()))
+ return NULL;
+
+ RendererPpapiHostImpl* host_impl =
+ content::RendererPpapiHostImpl::CreateOnModuleForOutOfProcess(
jam 2012/10/16 21:14:43 nit: no need for content::
bbudge 2012/10/17 00:18:44 Done.
+ plugin_module, dispatcher->dispatcher(), permissions);
+ render_view_->PpapiPluginCreated(host_impl);
+
+ plugin_module->InitAsProxied(dispatcher.release());
+
+ return host_impl;
+}
+
scoped_refptr<webkit::ppapi::PluginModule>
PepperPluginDelegateImpl::CreateBrowserPluginModule(
const IPC::ChannelHandle& channel_handle,

Powered by Google App Engine
This is Rietveld 408576698