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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 9108001: Adds support for calling postMessage on a frame living in a different renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Invert check. Created 8 years, 7 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/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 1009543931721c0368bafd5c2615fca5298b3ee4..f287c0eba0f09a61ccff4f2f6fbe11d9f46db19d 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -875,6 +875,7 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
OnMsgDidChangeNumWheelEvents)
IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent,
OnMsgRouteCloseEvent)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnMsgRouteMessageEvent)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage,
OnMsgRunJavaScriptMessage)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm,
@@ -1281,6 +1282,12 @@ void RenderViewHostImpl::OnMsgRouteCloseEvent() {
delegate_->RouteCloseEvent(this);
}
+void RenderViewHostImpl::OnMsgRouteMessageEvent(
+ const ViewMsg_PostMessage_Params& params) {
+ // Give to the delegate to route to the active RenderViewHost.
+ delegate_->RouteMessageEvent(this, params);
+}
+
void RenderViewHostImpl::OnMsgRunJavaScriptMessage(
const string16& message,
const string16& default_prompt,

Powered by Google App Engine
This is Rietveld 408576698