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" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) | 219 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) |
220 IPC_STRUCT_TRAITS_MEMBER(method) | 220 IPC_STRUCT_TRAITS_MEMBER(method) |
221 IPC_STRUCT_TRAITS_MEMBER(headers) | 221 IPC_STRUCT_TRAITS_MEMBER(headers) |
222 IPC_STRUCT_TRAITS_MEMBER(load_flags) | 222 IPC_STRUCT_TRAITS_MEMBER(load_flags) |
223 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) | 223 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) |
224 IPC_STRUCT_TRAITS_END() | 224 IPC_STRUCT_TRAITS_END() |
225 | 225 |
226 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) | 226 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) |
227 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) | 227 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) |
228 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) | 228 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) |
| 229 IPC_STRUCT_TRAITS_MEMBER(redirects) |
| 230 IPC_STRUCT_TRAITS_MEMBER(can_load_local_resources) |
| 231 IPC_STRUCT_TRAITS_MEMBER(frame_to_navigate) |
| 232 IPC_STRUCT_TRAITS_MEMBER(request_time) |
229 IPC_STRUCT_TRAITS_END() | 233 IPC_STRUCT_TRAITS_END() |
230 | 234 |
231 IPC_STRUCT_TRAITS_BEGIN(content::HistoryNavigationParams) | 235 IPC_STRUCT_TRAITS_BEGIN(content::HistoryNavigationParams) |
232 IPC_STRUCT_TRAITS_MEMBER(page_state) | 236 IPC_STRUCT_TRAITS_MEMBER(page_state) |
233 IPC_STRUCT_TRAITS_MEMBER(page_id) | 237 IPC_STRUCT_TRAITS_MEMBER(page_id) |
234 IPC_STRUCT_TRAITS_MEMBER(pending_history_list_offset) | 238 IPC_STRUCT_TRAITS_MEMBER(pending_history_list_offset) |
235 IPC_STRUCT_TRAITS_MEMBER(current_history_list_offset) | 239 IPC_STRUCT_TRAITS_MEMBER(current_history_list_offset) |
236 IPC_STRUCT_TRAITS_MEMBER(current_history_list_length) | 240 IPC_STRUCT_TRAITS_MEMBER(current_history_list_length) |
237 IPC_STRUCT_TRAITS_MEMBER(should_clear_history_list) | 241 IPC_STRUCT_TRAITS_MEMBER(should_clear_history_list) |
238 IPC_STRUCT_TRAITS_END() | 242 IPC_STRUCT_TRAITS_END() |
239 | 243 |
| 244 IPC_STRUCT_TRAITS_BEGIN(content::StartNavigationParams) |
| 245 IPC_STRUCT_TRAITS_MEMBER(is_post) |
| 246 IPC_STRUCT_TRAITS_MEMBER(extra_headers) |
| 247 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) |
| 248 IPC_STRUCT_TRAITS_MEMBER(should_replace_current_entry) |
| 249 IPC_STRUCT_TRAITS_MEMBER(transferred_request_child_id) |
| 250 IPC_STRUCT_TRAITS_MEMBER(transferred_request_request_id) |
| 251 IPC_STRUCT_TRAITS_END() |
| 252 |
240 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) | 253 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) |
241 IPC_STRUCT_TRAITS_MEMBER(origin) | 254 IPC_STRUCT_TRAITS_MEMBER(origin) |
242 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags) | 255 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags) |
243 IPC_STRUCT_TRAITS_MEMBER(name) | 256 IPC_STRUCT_TRAITS_MEMBER(name) |
244 IPC_STRUCT_TRAITS_END() | 257 IPC_STRUCT_TRAITS_END() |
245 | 258 |
246 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams) | 259 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams) |
247 // Gives the routing ID for the RenderWidget that will be attached to the | 260 // Gives the routing ID for the RenderWidget that will be attached to the |
248 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this | 261 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this |
249 // is MSG_ROUTING_NONE and the other parameters are not read. | 262 // is MSG_ROUTING_NONE and the other parameters are not read. |
250 IPC_STRUCT_MEMBER(int, routing_id) | 263 IPC_STRUCT_MEMBER(int, routing_id) |
251 | 264 |
252 // Identifier for the output surface for the new RenderWidget. | 265 // Identifier for the output surface for the new RenderWidget. |
253 IPC_STRUCT_MEMBER(int, surface_id) | 266 IPC_STRUCT_MEMBER(int, surface_id) |
254 | 267 |
255 // Tells the new RenderWidget whether it is initially hidden. | 268 // Tells the new RenderWidget whether it is initially hidden. |
256 IPC_STRUCT_MEMBER(bool, hidden) | 269 IPC_STRUCT_MEMBER(bool, hidden) |
257 IPC_STRUCT_END() | 270 IPC_STRUCT_END() |
258 | 271 |
259 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) | |
260 // TODO(clamy): investigate which parameters are also needed in PlzNavigate | |
261 // and move them to the appropriate NavigationParams struct. | |
262 | |
263 // These structs contain parameters shared by other navigation IPCs. | |
264 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params) | |
265 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params) | |
266 IPC_STRUCT_MEMBER(content::HistoryNavigationParams, history_params) | |
267 | |
268 // Whether the navigation is a POST request (as opposed to a GET). | |
269 IPC_STRUCT_MEMBER(bool, is_post) | |
270 | |
271 // Extra headers (separated by \n) to send during the request. | |
272 IPC_STRUCT_MEMBER(std::string, extra_headers) | |
273 | |
274 // If is_post is true, holds the post_data information from browser. Empty | |
275 // otherwise. | |
276 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data) | |
277 | |
278 // Any redirect URLs that occurred before |url|. Useful for cross-process | |
279 // navigations; defaults to empty. | |
280 IPC_STRUCT_MEMBER(std::vector<GURL>, redirects) | |
281 | |
282 // Informs the RenderView the pending navigation should replace the current | |
283 // history entry when it commits. This is used for cross-process redirects so | |
284 // the transferred navigation can recover the navigation state. | |
285 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) | |
286 | |
287 // The time the request was created. This is used by the old performance | |
288 // infrastructure to set up DocumentState associated with the RenderView. | |
289 // TODO(ppi): make it go away. | |
290 IPC_STRUCT_MEMBER(base::Time, request_time) | |
291 | |
292 // The following two members identify a previous request that has been | |
293 // created before this navigation is being transferred to a new render view. | |
294 // This serves the purpose of recycling the old request. | |
295 // Unless this refers to a transferred navigation, these values are -1 and -1. | |
296 IPC_STRUCT_MEMBER(int, transferred_request_child_id) | |
297 IPC_STRUCT_MEMBER(int, transferred_request_request_id) | |
298 | |
299 // Whether or not this url should be allowed to access local file:// | |
300 // resources. | |
301 IPC_STRUCT_MEMBER(bool, can_load_local_resources) | |
302 | |
303 // If not empty, which frame to navigate. | |
304 IPC_STRUCT_MEMBER(std::string, frame_to_navigate) | |
305 IPC_STRUCT_END() | |
306 | |
307 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) | 272 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
308 IPC_STRUCT_MEMBER(GURL, url) | 273 IPC_STRUCT_MEMBER(GURL, url) |
309 IPC_STRUCT_MEMBER(content::Referrer, referrer) | 274 IPC_STRUCT_MEMBER(content::Referrer, referrer) |
310 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) | 275 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) |
311 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) | 276 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
312 IPC_STRUCT_MEMBER(bool, user_gesture) | 277 IPC_STRUCT_MEMBER(bool, user_gesture) |
313 IPC_STRUCT_END() | 278 IPC_STRUCT_END() |
314 | 279 |
315 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 280 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
316 // This message is used for supporting popup menus on Mac OS X and Android using | 281 // This message is used for supporting popup menus on Mac OS X and Android using |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 // identified by |parent_routing_id| or as top level if that is | 356 // identified by |parent_routing_id| or as top level if that is |
392 // MSG_ROUTING_NONE. | 357 // MSG_ROUTING_NONE. |
393 IPC_MESSAGE_CONTROL4(FrameMsg_NewFrameProxy, | 358 IPC_MESSAGE_CONTROL4(FrameMsg_NewFrameProxy, |
394 int /* routing_id */, | 359 int /* routing_id */, |
395 int /* parent_routing_id */, | 360 int /* parent_routing_id */, |
396 int /* render_view_routing_id */, | 361 int /* render_view_routing_id */, |
397 content::FrameReplicationState /* replication_state */) | 362 content::FrameReplicationState /* replication_state */) |
398 | 363 |
399 // Tells the renderer to perform the specified navigation, interrupting any | 364 // Tells the renderer to perform the specified navigation, interrupting any |
400 // existing navigation. | 365 // existing navigation. |
401 IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params) | 366 IPC_MESSAGE_ROUTED4(FrameMsg_Navigate, |
| 367 content::CommonNavigationParams, /* common_params */ |
| 368 content::StartNavigationParams, /* start_params */ |
| 369 content::CommitNavigationParams, /* commit_params */ |
| 370 content::HistoryNavigationParams /* history_params */) |
402 | 371 |
403 // Instructs the renderer to invoke the frame's beforeunload event handler. | 372 // Instructs the renderer to invoke the frame's beforeunload event handler. |
404 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK. | 373 // Expects the result to be returned via FrameHostMsg_BeforeUnload_ACK. |
405 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload) | 374 IPC_MESSAGE_ROUTED0(FrameMsg_BeforeUnload) |
406 | 375 |
407 // Instructs the frame to swap out for a cross-site transition, including | 376 // Instructs the frame to swap out for a cross-site transition, including |
408 // running the unload event handler and creating a RenderFrameProxy with the | 377 // running the unload event handler and creating a RenderFrameProxy with the |
409 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished. | 378 // given |proxy_routing_id|. Expects a SwapOut_ACK message when finished. |
410 IPC_MESSAGE_ROUTED3(FrameMsg_SwapOut, | 379 IPC_MESSAGE_ROUTED3(FrameMsg_SwapOut, |
411 int /* proxy_routing_id */, | 380 int /* proxy_routing_id */, |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad) | 838 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad) |
870 | 839 |
871 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 840 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
872 | 841 |
873 // Message to show/hide a popup menu using native controls. | 842 // Message to show/hide a popup menu using native controls. |
874 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 843 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
875 FrameHostMsg_ShowPopup_Params) | 844 FrameHostMsg_ShowPopup_Params) |
876 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 845 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
877 | 846 |
878 #endif | 847 #endif |
OLD | NEW |