OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // IPC messages for interacting with frames. | 5 // IPC messages for interacting with frames. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "content/common/content_param_traits.h" | 9 #include "content/common/content_param_traits.h" |
10 #include "content/common/frame_message_enums.h" | 10 #include "content/common/frame_message_enums.h" |
11 #include "content/common/frame_param.h" | 11 #include "content/common/frame_param.h" |
| 12 #include "content/common/frame_replication_state.h" |
12 #include "content/common/navigation_gesture.h" | 13 #include "content/common/navigation_gesture.h" |
13 #include "content/common/navigation_params.h" | 14 #include "content/common/navigation_params.h" |
14 #include "content/common/resource_request_body.h" | 15 #include "content/common/resource_request_body.h" |
15 #include "content/public/common/color_suggestion.h" | 16 #include "content/public/common/color_suggestion.h" |
16 #include "content/public/common/common_param_traits.h" | 17 #include "content/public/common/common_param_traits.h" |
17 #include "content/public/common/context_menu_params.h" | 18 #include "content/public/common/context_menu_params.h" |
18 #include "content/public/common/frame_navigate_params.h" | 19 #include "content/public/common/frame_navigate_params.h" |
19 #include "content/public/common/javascript_message_type.h" | 20 #include "content/public/common/javascript_message_type.h" |
20 #include "content/public/common/page_state.h" | 21 #include "content/public/common/page_state.h" |
21 #include "content/public/common/resource_response.h" | 22 #include "content/public/common/resource_response.h" |
22 #include "content/public/common/transition_element.h" | 23 #include "content/public/common/transition_element.h" |
23 #include "ipc/ipc_message_macros.h" | 24 #include "ipc/ipc_message_macros.h" |
24 #include "ui/gfx/ipc/gfx_param_traits.h" | 25 #include "ui/gfx/ipc/gfx_param_traits.h" |
25 #include "url/gurl.h" | 26 #include "url/gurl.h" |
| 27 #include "url/origin.h" |
26 | 28 |
27 #undef IPC_MESSAGE_EXPORT | 29 #undef IPC_MESSAGE_EXPORT |
28 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 30 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
29 | 31 |
30 #define IPC_MESSAGE_START FrameMsgStart | 32 #define IPC_MESSAGE_START FrameMsgStart |
31 | 33 |
32 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, | 34 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, |
33 AccessibilityModeOff, | 35 AccessibilityModeOff, |
34 AccessibilityModeComplete) | 36 AccessibilityModeComplete) |
35 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, | 37 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 182 |
181 // The routing_id of the render view associated with the navigation. | 183 // The routing_id of the render view associated with the navigation. |
182 // We need to track the RenderViewHost routing_id because of downstream | 184 // We need to track the RenderViewHost routing_id because of downstream |
183 // dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager, | 185 // dependencies (crbug.com/392171 DownloadRequestHandle, SaveFileManager, |
184 // ResourceDispatcherHostImpl, MediaStreamUIProxy, | 186 // ResourceDispatcherHostImpl, MediaStreamUIProxy, |
185 // SpeechRecognitionDispatcherHost and possibly others). They look up the view | 187 // SpeechRecognitionDispatcherHost and possibly others). They look up the view |
186 // based on the ID stored in the resource requests. Once those dependencies | 188 // based on the ID stored in the resource requests. Once those dependencies |
187 // are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the | 189 // are unwound or moved to RenderFrameHost (crbug.com/304341) we can move the |
188 // client to be based on the routing_id of the RenderFrameHost. | 190 // client to be based on the routing_id of the RenderFrameHost. |
189 IPC_STRUCT_MEMBER(int, render_view_routing_id) | 191 IPC_STRUCT_MEMBER(int, render_view_routing_id) |
| 192 |
| 193 // Origin of the frame. This will be replicated to any associated |
| 194 // RenderFrameProxies. |
| 195 IPC_STRUCT_MEMBER(url::Origin, origin) |
190 IPC_STRUCT_END() | 196 IPC_STRUCT_END() |
191 | 197 |
192 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) | 198 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) |
193 IPC_STRUCT_TRAITS_MEMBER(url) | 199 IPC_STRUCT_TRAITS_MEMBER(url) |
194 IPC_STRUCT_TRAITS_MEMBER(referrer) | 200 IPC_STRUCT_TRAITS_MEMBER(referrer) |
195 IPC_STRUCT_TRAITS_MEMBER(transition) | 201 IPC_STRUCT_TRAITS_MEMBER(transition) |
196 IPC_STRUCT_TRAITS_MEMBER(navigation_type) | 202 IPC_STRUCT_TRAITS_MEMBER(navigation_type) |
197 IPC_STRUCT_TRAITS_MEMBER(allow_download) | 203 IPC_STRUCT_TRAITS_MEMBER(allow_download) |
198 IPC_STRUCT_TRAITS_END() | 204 IPC_STRUCT_TRAITS_END() |
199 | 205 |
200 IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams) | 206 IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams) |
201 IPC_STRUCT_TRAITS_MEMBER(is_post) | 207 IPC_STRUCT_TRAITS_MEMBER(is_post) |
202 IPC_STRUCT_TRAITS_MEMBER(extra_headers) | 208 IPC_STRUCT_TRAITS_MEMBER(extra_headers) |
203 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) | 209 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) |
204 IPC_STRUCT_TRAITS_END() | 210 IPC_STRUCT_TRAITS_END() |
205 | 211 |
206 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) | 212 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) |
207 IPC_STRUCT_TRAITS_MEMBER(page_state) | 213 IPC_STRUCT_TRAITS_MEMBER(page_state) |
208 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) | 214 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) |
209 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) | 215 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) |
210 IPC_STRUCT_TRAITS_END() | 216 IPC_STRUCT_TRAITS_END() |
211 | 217 |
| 218 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) |
| 219 IPC_STRUCT_TRAITS_MEMBER(origin) |
| 220 IPC_STRUCT_TRAITS_END() |
| 221 |
212 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) | 222 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) |
213 // TODO(clamy): investigate which parameters are also needed in PlzNavigate | 223 // TODO(clamy): investigate which parameters are also needed in PlzNavigate |
214 // and move them to the appropriate NavigationParams struct. | 224 // and move them to the appropriate NavigationParams struct. |
215 | 225 |
216 // These structs contain parameters shared by other navigation IPCs. | 226 // These structs contain parameters shared by other navigation IPCs. |
217 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params) | 227 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params) |
218 IPC_STRUCT_MEMBER(content::RequestNavigationParams, request_params) | 228 IPC_STRUCT_MEMBER(content::RequestNavigationParams, request_params) |
219 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params) | 229 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params) |
220 | 230 |
221 // The page_id for this navigation, or -1 if it is a new navigation. Back, | 231 // The page_id for this navigation, or -1 if it is a new navigation. Back, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 // to replace the proxy on commit. | 379 // to replace the proxy on commit. |
370 IPC_MESSAGE_CONTROL3(FrameMsg_NewFrame, | 380 IPC_MESSAGE_CONTROL3(FrameMsg_NewFrame, |
371 int /* routing_id */, | 381 int /* routing_id */, |
372 int /* parent_routing_id */, | 382 int /* parent_routing_id */, |
373 int /* proxy_routing_id */) | 383 int /* proxy_routing_id */) |
374 | 384 |
375 // Instructs the renderer to create a new RenderFrameProxy object with | 385 // Instructs the renderer to create a new RenderFrameProxy object with |
376 // |routing_id|. The new proxy should be created as a child of the object | 386 // |routing_id|. The new proxy should be created as a child of the object |
377 // identified by |parent_routing_id| or as top level if that is | 387 // identified by |parent_routing_id| or as top level if that is |
378 // MSG_ROUTING_NONE. | 388 // MSG_ROUTING_NONE. |
379 IPC_MESSAGE_CONTROL3(FrameMsg_NewFrameProxy, | 389 IPC_MESSAGE_CONTROL4(FrameMsg_NewFrameProxy, |
380 int /* routing_id */, | 390 int /* routing_id */, |
381 int /* parent_routing_id */, | 391 int /* parent_routing_id */, |
382 int /* render_view_routing_id */) | 392 int /* render_view_routing_id */, |
| 393 content::FrameReplicationState /* replication_state */) |
383 | 394 |
384 // Tells the renderer to perform the specified navigation, interrupting any | 395 // Tells the renderer to perform the specified navigation, interrupting any |
385 // existing navigation. | 396 // existing navigation. |
386 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params) | 397 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params) |
387 | 398 |
388 // Instructs the renderer to invoke the frame's beforeunload event handler. | 399 // Instructs the renderer to invoke the frame's beforeunload event handler. |
389 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK. | 400 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK. |
390 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload) | 401 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload) |
391 | 402 |
392 // Instructs the frame to swap out for a cross-site transition, including | 403 // Instructs the frame to swap out for a cross-site transition, including |
393 // running the unload event handler and creating a RenderFrameProxy with the | 404 // running the unload event handler and creating a RenderFrameProxy with the |
394 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished. | 405 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished. |
395 IPC_MESSAGE_ROUTED1(FrameMsg_SwapOut, | 406 IPC_MESSAGE_ROUTED2(FrameMsg_SwapOut, |
396 int /* proxy_routing_id */) | 407 int /* proxy_routing_id */, |
| 408 content::FrameReplicationState /* replication_state */) |
397 | 409 |
398 // Instructs the frame to stop the load in progress, if any. | 410 // Instructs the frame to stop the load in progress, if any. |
399 IPC_MESSAGE_ROUTED0(FrameMsg_Stop) | 411 IPC_MESSAGE_ROUTED0(FrameMsg_Stop) |
400 | 412 |
401 // Request for the renderer to insert CSS into the frame. | 413 // Request for the renderer to insert CSS into the frame. |
402 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest, | 414 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest, |
403 std::string /* css */) | 415 std::string /* css */) |
404 | 416 |
405 // Request for the renderer to execute JavaScript in the frame's context. | 417 // Request for the renderer to execute JavaScript in the frame's context. |
406 // | 418 // |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) | 804 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) |
793 | 805 |
794 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 806 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
795 | 807 |
796 // Message to show/hide a popup menu using native controls. | 808 // Message to show/hide a popup menu using native controls. |
797 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 809 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
798 FrameHostMsg_ShowPopup_Params) | 810 FrameHostMsg_ShowPopup_Params) |
799 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 811 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
800 | 812 |
801 #endif | 813 #endif |
OLD | NEW |