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

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: 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
« no previous file with comments | « content/common/swapped_out_messages.cc ('k') | content/public/browser/render_view_host_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/view_messages.h
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 4a89eb7daa13789adbb8e6ee0c091c09e61e1f37..920f2cc3902da4b058f17d4760573111075f0163 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(ViewMsg_PostMessage_Params)
+ // 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,
+ ViewMsg_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,
+ ViewMsg_PostMessage_Params)
+
IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
string16 /* in - alert message */,
string16 /* in - default prompt */,
« no previous file with comments | « content/common/swapped_out_messages.cc ('k') | content/public/browser/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698