Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1241)

Unified Diff: content/browser/browser_plugin/browser_plugin_guest_helper.cc

Issue 10829225: Browser Plugin: Add HTML5-like postMessage support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed crash + cleanup Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 95f725c79d70e7b6fd4e9edc2b6abf56731d7b6b..e49411be63032a63481ef6962ad961de924192ea 100644
--- a/content/browser/browser_plugin/browser_plugin_guest_helper.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest_helper.cc
@@ -35,6 +35,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)
@@ -69,4 +79,9 @@ void BrowserPluginGuestHelper::OnSetCursor(const WebCursor& cursor) {
guest_->SetCursor(cursor);
}
+void BrowserPluginGuestHelper::OnRouteMessageEvent(
+ const ViewMsg_PostMessage_Params& params) {
+ guest_->RouteMessageEvent(params);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698