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

Unified Diff: content/common/view_messages.h

Issue 10827078: Support frame tree propagation between renderers in the same browsing instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved away from hardcoded strings and no static cast needed for tests. Created 8 years, 4 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 45b0c4b1cba7dc1ed302de40d064cbcea5abd60c..8c1e7fad4faf4edd54f1bf150fe78a05dc74040d 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -572,9 +572,16 @@ IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
// 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).
+ // equivalent (swapped out) frame in the destination process.
IPC_STRUCT_MEMBER(int, source_routing_id)
+ // The identifier of the source frame in the source process.
+ IPC_STRUCT_MEMBER(int, source_frame_id)
+
+ // The full set of identifiers to uniquely descirbe the target frame. See
+ // the comment on ViewMsg_UpdateFrameTree for details.
+ IPC_STRUCT_MEMBER(int, target_process_id)
+ IPC_STRUCT_MEMBER(int, target_routing_id)
+ IPC_STRUCT_MEMBER(int, target_frame_id)
// The origin of the source frame.
IPC_STRUCT_MEMBER(string16, source_origin)
@@ -1038,6 +1045,20 @@ IPC_MESSAGE_ROUTED4(ViewMsg_ScriptEvalRequest,
IPC_MESSAGE_ROUTED1(ViewMsg_PostMessageEvent,
ViewMsg_PostMessage_Params)
+// Sends a JSON serialized frame tree to render processes along with the
+// process id and route id of the source renderer.
+//
+// When routing JavaScript calls across processes, the destination information
+// is kept in the renderer process instead of the browser process. This design
+// was chosen because frame ids are allocated by the renderer process. If the
+// browser was to keep a mapping of the frame ids across processes, it will
+// require an extra IPC message with the newly allocated frame ids, as a
+// response to this particular message.
awong 2012/08/21 19:27:28 Describe the json format here. Then in other spots
nasko 2012/08/21 22:24:13 The description was in the render view, but I've m
+IPC_MESSAGE_ROUTED3(ViewMsg_UpdateFrameTree,
+ int, /* the child process id of the active renderer */
+ int, /* route_id of the active renderer */
+ std::string /* json encoded frame tree */)
+
// 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.
@@ -2192,3 +2213,8 @@ IPC_MESSAGE_ROUTED3(ViewHostMsg_PepperPluginHung,
// Screen was rotated. Dispatched to the onorientationchange javascript API.
IPC_MESSAGE_ROUTED1(ViewMsg_OrientationChangeEvent,
int /* orientation */)
+
+// Sends a JSON serialized frame tree from the active render process to the
+// browser.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameTreeUpdated,
+ std::string /* json encoded frame tree */)

Powered by Google App Engine
This is Rietveld 408576698