Index: content/browser/browser_plugin/browser_plugin_guest_helper.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_guest_helper.cc b/content/browser/browser_plugin/browser_plugin_guest_helper.cc |
index 68512ca4b322f160ef99dadfec65639c4a5c3f0f..b5e53bd406dfd7afc8605fb74986beb5d9473296 100644 |
--- a/content/browser/browser_plugin/browser_plugin_guest_helper.cc |
+++ b/content/browser/browser_plugin/browser_plugin_guest_helper.cc |
@@ -5,9 +5,9 @@ |
#include "content/browser/browser_plugin/browser_plugin_guest_helper.h" |
#include "content/browser/browser_plugin/browser_plugin_guest.h" |
+#include "content/browser/renderer_host/render_view_host_impl.h" |
#include "content/browser/web_contents/web_contents_impl.h" |
#include "content/common/view_messages.h" |
-#include "content/public/browser/render_view_host.h" |
namespace content { |
@@ -25,6 +25,16 @@ bool BrowserPluginGuestHelper::OnMessageReceived( |
const IPC::Message& message) { |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP(BrowserPluginGuestHelper, message) |
+ IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent) |
+ IPC_MESSAGE_UNHANDLED(handled = false) |
+ IPC_END_MESSAGE_MAP() |
+ |
+ if (static_cast<RenderViewHostImpl*>(render_view_host())->is_swapped_out()) { |
+ return handled; |
+ } |
+ |
+ handled = true; |
+ IPC_BEGIN_MESSAGE_MAP(BrowserPluginGuestHelper, message) |
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnHandleInputEventAck) |
IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
@@ -65,4 +75,9 @@ void BrowserPluginGuestHelper::OnSetCursor(const WebCursor& cursor) { |
guest_->SetCursor(cursor); |
} |
+void BrowserPluginGuestHelper::OnRouteMessageEvent( |
+ const ViewMsg_PostMessage_Params& params) { |
+ guest_->RouteMessageEvent(params); |
+} |
+ |
} // namespace content |