Index: content/renderer/browser_plugin/browser_plugin_manager_impl.cc |
diff --git a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc |
index 63143daab0664c053ffe7eeabee448dc88abe98b..bfca48aa57102889bbd6a9e7d7ff5657f537eac9 100644 |
--- a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc |
+++ b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc |
@@ -12,7 +12,9 @@ |
namespace content { |
-BrowserPluginManagerImpl::BrowserPluginManagerImpl() { |
+BrowserPluginManagerImpl::BrowserPluginManagerImpl( |
+ RenderViewImpl* render_view) |
+ : BrowserPluginManager(render_view) { |
} |
BrowserPluginManagerImpl::~BrowserPluginManagerImpl() { |
@@ -32,9 +34,8 @@ bool BrowserPluginManagerImpl::Send(IPC::Message* msg) { |
return RenderThread::Get()->Send(msg); |
} |
-bool BrowserPluginManagerImpl::OnControlMessageReceived( |
+bool BrowserPluginManagerImpl::OnMessageReceived( |
const IPC::Message& message) { |
- DCHECK(CalledOnValidThread()); |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP(BrowserPluginManagerImpl, message) |
IPC_MESSAGE_HANDLER(BrowserPluginMsg_UpdateRect, OnUpdateRect) |
@@ -58,16 +59,17 @@ bool BrowserPluginManagerImpl::OnControlMessageReceived( |
} |
void BrowserPluginManagerImpl::OnPluginAtPositionRequest( |
- int source_routing_id, int request_id, const gfx::Point& position) { |
+ int request_id, const gfx::Point& position) { |
int instance_id = -1; |
IDMap<BrowserPlugin>::iterator it(&instances_); |
gfx::Point local_position = position; |
+ int source_routing_id = -1; |
while (!it.IsAtEnd()) { |
const BrowserPlugin* plugin = it.GetCurrentValue(); |
// We need to check the plugin's routing id too since BrowserPluginManager |
// can manage plugins from other embedder (in the same process). |
- if (plugin->render_view_routing_id() == source_routing_id && |
- plugin->InBounds(position)) { |
+ if (plugin->InBounds(position)) { |
+ source_routing_id = plugin->render_view_routing_id(); |
instance_id = plugin->instance_id(); |
local_position = plugin->ToLocalCoordinates(position); |
break; |
@@ -76,10 +78,10 @@ void BrowserPluginManagerImpl::OnPluginAtPositionRequest( |
} |
Send(new BrowserPluginHostMsg_PluginAtPositionResponse( |
- source_routing_id, |
- instance_id, |
- request_id, |
- local_position)); |
+ source_routing_id, |
+ instance_id, |
+ request_id, |
+ local_position)); |
} |
void BrowserPluginManagerImpl::OnUpdateRect( |