Chromium Code Reviews| Index: content/browser/browser_plugin/browser_plugin_embedder.cc |
| diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc |
| index 5313268a62405ca70663c29dd504a43baa501847..25c4c32687dd7b72f68ca2b2130650051d6cbd6a 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_embedder.cc |
| +++ b/content/browser/browser_plugin/browser_plugin_embedder.cc |
| @@ -98,8 +98,15 @@ void BrowserPluginEmbedder::DidSendScreenRects() { |
| } |
| bool BrowserPluginEmbedder::OnMessageReceived(const IPC::Message& message) { |
| + return OnMessageReceived(message, nullptr); |
| +} |
| + |
| +bool BrowserPluginEmbedder::OnMessageReceived( |
| + const IPC::Message& message, |
| + RenderFrameHost* render_frame_host) { |
| bool handled = true; |
| - IPC_BEGIN_MESSAGE_MAP(BrowserPluginEmbedder, message) |
| + IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(BrowserPluginEmbedder, message, |
| + render_frame_host) |
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Attach, OnAttach) |
| IPC_MESSAGE_HANDLER_GENERIC(DragHostMsg_UpdateDragCursor, |
| OnUpdateDragCursor(&handled)); |
| @@ -135,11 +142,16 @@ void BrowserPluginEmbedder::OnUpdateDragCursor(bool* handled) { |
| } |
| void BrowserPluginEmbedder::OnAttach( |
| + RenderFrameHost* render_frame_host, |
| int browser_plugin_instance_id, |
| const BrowserPluginHostMsg_Attach_Params& params) { |
| + // TODO(fsamuel): Change message routing to use the process ID of the |
| + // |render_frame_host| once BrowserPlugin IPCs get routed using the RFH |
| + // routing ID. |
|
Charlie Reis
2015/02/13 22:36:14
nit: Please add a bug number to track this. (Curr
Fady Samuel
2015/02/13 22:47:09
Done.
|
| WebContents* guest_web_contents = |
| GetBrowserPluginGuestManager()->GetGuestByInstanceID( |
| - GetWebContents(), browser_plugin_instance_id); |
| + GetWebContents()->GetRenderProcessHost()->GetID(), |
| + browser_plugin_instance_id); |
| if (!guest_web_contents) |
| return; |
| BrowserPluginGuest* guest = static_cast<WebContentsImpl*>(guest_web_contents) |