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

Unified Diff: content/common/view_messages.h

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/common/view_messages.h
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 4e18783c0361d54bb373f6e8242f11aeb4d5fd70..1b556dfad3f06aa8bd88284ec2ad4d940a72e0aa 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -524,6 +524,23 @@ IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
IPC_STRUCT_MEMBER(bool, needs_ack)
IPC_STRUCT_END()
+IPC_STRUCT_BEGIN(ViewHostMsg_PostMessage_Params)
jam 2012/05/14 06:41:45 why isn't this VieMsg_PostMessage_Params to match
Charlie Reis 2012/05/14 17:38:43 It's an identical struct passed in both directions
+ // The serialized script value.
+ IPC_STRUCT_MEMBER(string16, data)
+
+ // When sent to the browser, this is the routing ID of the source frame in
+ // the source process. The browser replaces it with the routing ID of the
+ // equivalent (swapped out) frame in the destination process. Set to
+ // MSG_ROUTING_NONE if the source frame isn't supported (e.g., subframes).
+ IPC_STRUCT_MEMBER(int, source_routing_id)
+
+ // The origin of the source frame.
+ IPC_STRUCT_MEMBER(string16, source_origin)
+
+ // The origin for the message's target.
+ IPC_STRUCT_MEMBER(string16, target_origin)
+IPC_STRUCT_END()
+
IPC_STRUCT_BEGIN(ViewHostMsg_DidFailProvisionalLoadWithError_Params)
// The frame ID for the failure report.
IPC_STRUCT_MEMBER(int64, frame_id)
@@ -927,6 +944,10 @@ IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest,
int, /* ID */
bool /* If true, result is sent back. */)
+// Posts a message from a frame in another process to the current renderer.
+IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
+ ViewHostMsg_PostMessage_Params)
+
// Request for the renderer to evaluate an xpath to a frame and insert css
// into that frame's document. See ViewMsg_ScriptEvalRequest for details on
// allowed xpath expressions.
@@ -1616,6 +1637,11 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
// renderer, instructing it to close.
IPC_MESSAGE_ROUTED0(ViewHostMsg_RouteCloseEvent)
+// Sent to the browser from an inactive renderer to post a message to the
+// active renderer.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_RouteMessageEvent,
+ ViewHostMsg_PostMessage_Params)
+
IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
string16 /* in - alert message */,
string16 /* in - default prompt */,

Powered by Google App Engine
This is Rietveld 408576698