| Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| index d36c8f41eb75686ca21f4fe1bb642a0d0443f5c9..6b8c08ee62c5ea5c3d3855802d511b0e146ff245 100644
|
| --- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| @@ -107,8 +107,11 @@ class HostDispatcherWrapper
|
| public:
|
| HostDispatcherWrapper(RenderViewImpl* rv,
|
| webkit::ppapi::PluginModule* module,
|
| + int plugin_child_id,
|
| const ppapi::PpapiPermissions& perms)
|
| - : module_(module),
|
| + : render_view_(rv),
|
| + module_(module),
|
| + plugin_child_id_(plugin_child_id),
|
| permissions_(perms) {
|
| }
|
| virtual ~HostDispatcherWrapper() {}
|
| @@ -150,16 +153,32 @@ class HostDispatcherWrapper
|
| }
|
| virtual void AddInstance(PP_Instance instance) {
|
| ppapi::proxy::HostDispatcher::SetForInstance(instance, dispatcher_.get());
|
| +
|
| + render_view_->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance(
|
| + plugin_child_id_,
|
| + instance,
|
| + render_view_->routing_id()));
|
| }
|
| virtual void RemoveInstance(PP_Instance instance) {
|
| ppapi::proxy::HostDispatcher::RemoveForInstance(instance);
|
| +
|
| + render_view_->Send(new ViewHostMsg_DidDeleteOutOfProcessPepperInstance(
|
| + plugin_child_id_,
|
| + instance));
|
| }
|
|
|
| ppapi::proxy::HostDispatcher* dispatcher() { return dispatcher_.get(); }
|
|
|
| private:
|
| + RenderViewImpl* render_view_;
|
| +
|
| webkit::ppapi::PluginModule* module_;
|
|
|
| + // ID that the browser process uses to idetify the child process for the
|
| + // plugin. This isn't directly useful from our process (the renderer) except
|
| + // in messages to the browser to disambiguate plugins.
|
| + int plugin_child_id_;
|
| +
|
| ppapi::PpapiPermissions permissions_;
|
|
|
| scoped_ptr<ppapi::proxy::HostDispatcher> dispatcher_;
|
| @@ -361,7 +380,8 @@ PepperPluginDelegateImpl::CreatePepperPluginModule(
|
| permissions);
|
| PepperPluginRegistry::GetInstance()->AddLiveModule(path, module);
|
| scoped_ptr<HostDispatcherWrapper> dispatcher(
|
| - new HostDispatcherWrapper(render_view_, module, permissions));
|
| + new HostDispatcherWrapper(render_view_, module, plugin_child_id,
|
| + permissions));
|
| if (!dispatcher->Init(
|
| channel_handle,
|
| webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(),
|
| @@ -406,7 +426,7 @@ scoped_refptr<webkit::ppapi::PluginModule>
|
| RenderThreadImpl::current()->browser_plugin_registry()->AddModule(
|
| guest_process_id, module);
|
| scoped_ptr<HostDispatcherWrapper> dispatcher(
|
| - new HostDispatcherWrapper(render_view_, module, permissions));
|
| + new HostDispatcherWrapper(render_view_, module, 0, permissions));
|
| if (!dispatcher->Init(
|
| channel_handle,
|
| webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(),
|
|
|