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

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: Use FromRoutingID 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 cf1ae7891770f99148e58f7b0123f7dac14b31c5..3a2ae6a88f93c0d3399edd62b55a9b68c57b9fca 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -874,6 +874,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,
@@ -1263,6 +1264,12 @@ void RenderViewHostImpl::OnMsgRouteCloseEvent() {
delegate_->RouteCloseEvent(this);
}
+void RenderViewHostImpl::OnMsgRouteMessageEvent(
+ const ViewHostMsg_PostMessage_Params& params) {
+ // Give to the delegate to route to the active RenderViewHost.
+ delegate_->RouteMessageEvent(this, params);
jam 2012/05/14 06:41:45 a while back, I had gone through and removed all t
Charlie Reis 2012/05/14 17:38:43 It's unsafe to dispatch messages like this directl
+}
+
void RenderViewHostImpl::OnMsgRunJavaScriptMessage(
const string16& message,
const string16& default_prompt,

Powered by Google App Engine
This is Rietveld 408576698