Index: content/browser/browser_plugin/browser_plugin_guest.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc |
index 4b1ff93c641e29a0482c34dbce3e16794f67e3a8..aa51d1fefca788e2bd6b43b028ce009a3107ffe4 100644 |
--- a/content/browser/browser_plugin/browser_plugin_guest.cc |
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc |
@@ -41,7 +41,9 @@ BrowserPluginGuest::BrowserPluginGuest(int instance_id, |
damage_buffer_size_(0), |
#endif |
pending_update_counter_(0), |
- guest_hang_timeout_(kGuestHangTimeout) { |
+ guest_hang_timeout_(kGuestHangTimeout), |
+ swapped_out_embedder_routing_id_(MSG_ROUTING_NONE), |
+ swapped_out_guest_routing_id_(MSG_ROUTING_NONE) { |
DCHECK(web_contents); |
// |render_view_host| manages the ownership of this BrowserPluginGuestHelper. |
new BrowserPluginGuestHelper(this, render_view_host); |
@@ -200,7 +202,7 @@ void BrowserPluginGuest::HandleInputEvent(RenderViewHost* render_view_host, |
// embedder doesn't hang. |
BrowserPluginHostMsg_HandleInputEvent::WriteReplyParams( |
reply_message, false /* handled */, cursor_); |
- embedder_render_process_host()->Send(reply_message); |
+ SendMessageToEmbedder(reply_message); |
return; |
} |
@@ -214,6 +216,15 @@ void BrowserPluginGuest::HandleInputEvent(RenderViewHost* render_view_host, |
guest_rvh->StartHangMonitorTimeout(guest_hang_timeout_); |
} |
+void BrowserPluginGuest::RouteMessageEvent( |
+ const ViewMsg_PostMessage_Params& params) { |
+ SendMessageToEmbedder(new BrowserPluginMsg_ReceiveMessage( |
+ instance_id(), |
+ swapped_out_embedder_routing_id(), |
+ params.source_origin, |
+ params.data)); |
+} |
+ |
void BrowserPluginGuest::HandleInputEventAck(RenderViewHost* render_view_host, |
bool handled) { |
RenderViewHostImpl* guest_rvh = |