Chromium Code Reviews| 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" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 202 IPC_STRUCT_TRAITS_MEMBER(extra_headers) | 203 IPC_STRUCT_TRAITS_MEMBER(extra_headers) |
| 203 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) | 204 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) |
| 204 IPC_STRUCT_TRAITS_END() | 205 IPC_STRUCT_TRAITS_END() |
| 205 | 206 |
| 206 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) | 207 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) |
| 207 IPC_STRUCT_TRAITS_MEMBER(page_state) | 208 IPC_STRUCT_TRAITS_MEMBER(page_state) |
| 208 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) | 209 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) |
| 209 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) | 210 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) |
| 210 IPC_STRUCT_TRAITS_END() | 211 IPC_STRUCT_TRAITS_END() |
| 211 | 212 |
| 213 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) | |
| 214 IPC_STRUCT_TRAITS_MEMBER(origin) | |
| 215 IPC_STRUCT_TRAITS_MEMBER(is_unique_origin) | |
| 216 IPC_STRUCT_TRAITS_END() | |
| 217 | |
| 212 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) | 218 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) |
| 213 // TODO(clamy): investigate which parameters are also needed in PlzNavigate | 219 // TODO(clamy): investigate which parameters are also needed in PlzNavigate |
| 214 // and move them to the appropriate NavigationParams struct. | 220 // and move them to the appropriate NavigationParams struct. |
| 215 | 221 |
| 216 // These structs contain parameters shared by other navigation IPCs. | 222 // These structs contain parameters shared by other navigation IPCs. |
| 217 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params) | 223 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params) |
| 218 IPC_STRUCT_MEMBER(content::RequestNavigationParams, request_params) | 224 IPC_STRUCT_MEMBER(content::RequestNavigationParams, request_params) |
| 219 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params) | 225 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params) |
| 220 | 226 |
| 221 // The page_id for this navigation, or -1 if it is a new navigation. Back, | 227 // 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. | 375 // to replace the proxy on commit. |
| 370 IPC_MESSAGE_CONTROL3(FrameMsg_NewFrame, | 376 IPC_MESSAGE_CONTROL3(FrameMsg_NewFrame, |
| 371 int /* routing_id */, | 377 int /* routing_id */, |
| 372 int /* parent_routing_id */, | 378 int /* parent_routing_id */, |
| 373 int /* proxy_routing_id */) | 379 int /* proxy_routing_id */) |
| 374 | 380 |
| 375 // Instructs the renderer to create a new RenderFrameProxy object with | 381 // 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 | 382 // |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 | 383 // identified by |parent_routing_id| or as top level if that is |
| 378 // MSG_ROUTING_NONE. | 384 // MSG_ROUTING_NONE. |
| 379 IPC_MESSAGE_CONTROL3(FrameMsg_NewFrameProxy, | 385 IPC_MESSAGE_CONTROL4(FrameMsg_NewFrameProxy, |
| 380 int /* routing_id */, | 386 int /* routing_id */, |
| 381 int /* parent_routing_id */, | 387 int /* parent_routing_id */, |
| 382 int /* render_view_routing_id */) | 388 int /* render_view_routing_id */, |
| 389 content::FrameReplicationState) | |
|
Charlie Reis
2014/11/13 18:00:57
nit: We put generally put names for the parameters
alexmos
2014/11/18 18:25:32
Fixed here and in SwapOut below.
| |
| 383 | 390 |
| 384 // Tells the renderer to perform the specified navigation, interrupting any | 391 // Tells the renderer to perform the specified navigation, interrupting any |
| 385 // existing navigation. | 392 // existing navigation. |
| 386 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params) | 393 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params) |
| 387 | 394 |
| 388 // Instructs the renderer to invoke the frame's beforeunload event handler. | 395 // Instructs the renderer to invoke the frame's beforeunload event handler. |
| 389 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK. | 396 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK. |
| 390 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload) | 397 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload) |
| 391 | 398 |
| 392 // Instructs the frame to swap out for a cross-site transition, including | 399 // Instructs the frame to swap out for a cross-site transition, including |
| 393 // running the unload event handler and creating a RenderFrameProxy with the | 400 // running the unload event handler and creating a RenderFrameProxy with the |
| 394 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished. | 401 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished. |
| 395 IPC_MESSAGE_ROUTED1(FrameMsg_SwapOut, | 402 IPC_MESSAGE_ROUTED2(FrameMsg_SwapOut, |
| 396 int /* proxy_routing_id */) | 403 int /* proxy_routing_id */, |
| 404 content::FrameReplicationState) | |
| 397 | 405 |
| 398 // Instructs the frame to stop the load in progress, if any. | 406 // Instructs the frame to stop the load in progress, if any. |
| 399 IPC_MESSAGE_ROUTED0(FrameMsg_Stop) | 407 IPC_MESSAGE_ROUTED0(FrameMsg_Stop) |
| 400 | 408 |
| 401 // Request for the renderer to insert CSS into the frame. | 409 // Request for the renderer to insert CSS into the frame. |
| 402 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest, | 410 IPC_MESSAGE_ROUTED1(FrameMsg_CSSInsertRequest, |
| 403 std::string /* css */) | 411 std::string /* css */) |
| 404 | 412 |
| 405 // Request for the renderer to execute JavaScript in the frame's context. | 413 // Request for the renderer to execute JavaScript in the frame's context. |
| 406 // | 414 // |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 783 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) | 791 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) |
| 784 | 792 |
| 785 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 793 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 786 | 794 |
| 787 // Message to show/hide a popup menu using native controls. | 795 // Message to show/hide a popup menu using native controls. |
| 788 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 796 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
| 789 FrameHostMsg_ShowPopup_Params) | 797 FrameHostMsg_ShowPopup_Params) |
| 790 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 798 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
| 791 | 799 |
| 792 #endif | 800 #endif |
| OLD | NEW |