| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) | 207 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) |
| 208 IPC_STRUCT_TRAITS_MEMBER(url) | 208 IPC_STRUCT_TRAITS_MEMBER(url) |
| 209 IPC_STRUCT_TRAITS_MEMBER(referrer) | 209 IPC_STRUCT_TRAITS_MEMBER(referrer) |
| 210 IPC_STRUCT_TRAITS_MEMBER(transition) | 210 IPC_STRUCT_TRAITS_MEMBER(transition) |
| 211 IPC_STRUCT_TRAITS_MEMBER(navigation_type) | 211 IPC_STRUCT_TRAITS_MEMBER(navigation_type) |
| 212 IPC_STRUCT_TRAITS_MEMBER(allow_download) | 212 IPC_STRUCT_TRAITS_MEMBER(allow_download) |
| 213 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) | 213 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) |
| 214 IPC_STRUCT_TRAITS_MEMBER(report_type) | 214 IPC_STRUCT_TRAITS_MEMBER(report_type) |
| 215 IPC_STRUCT_TRAITS_END() | 215 IPC_STRUCT_TRAITS_END() |
| 216 | 216 |
| 217 IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams) | 217 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) |
| 218 IPC_STRUCT_TRAITS_MEMBER(is_post) | 218 IPC_STRUCT_TRAITS_MEMBER(method) |
| 219 IPC_STRUCT_TRAITS_MEMBER(extra_headers) | 219 IPC_STRUCT_TRAITS_MEMBER(headers) |
| 220 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) | 220 IPC_STRUCT_TRAITS_MEMBER(load_flags) |
| 221 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) |
| 221 IPC_STRUCT_TRAITS_END() | 222 IPC_STRUCT_TRAITS_END() |
| 222 | 223 |
| 223 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) | 224 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) |
| 224 IPC_STRUCT_TRAITS_MEMBER(page_state) | 225 IPC_STRUCT_TRAITS_MEMBER(page_state) |
| 225 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) | 226 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) |
| 226 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) | 227 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) |
| 227 IPC_STRUCT_TRAITS_END() | 228 IPC_STRUCT_TRAITS_END() |
| 228 | 229 |
| 229 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) | 230 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) |
| 230 IPC_STRUCT_TRAITS_MEMBER(origin) | 231 IPC_STRUCT_TRAITS_MEMBER(origin) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 244 // Tells the new RenderWidget whether it is initially hidden. | 245 // Tells the new RenderWidget whether it is initially hidden. |
| 245 IPC_STRUCT_MEMBER(bool, hidden) | 246 IPC_STRUCT_MEMBER(bool, hidden) |
| 246 IPC_STRUCT_END() | 247 IPC_STRUCT_END() |
| 247 | 248 |
| 248 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) | 249 IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) |
| 249 // TODO(clamy): investigate which parameters are also needed in PlzNavigate | 250 // TODO(clamy): investigate which parameters are also needed in PlzNavigate |
| 250 // and move them to the appropriate NavigationParams struct. | 251 // and move them to the appropriate NavigationParams struct. |
| 251 | 252 |
| 252 // These structs contain parameters shared by other navigation IPCs. | 253 // These structs contain parameters shared by other navigation IPCs. |
| 253 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params) | 254 IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params) |
| 254 IPC_STRUCT_MEMBER(content::RequestNavigationParams, request_params) | |
| 255 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params) | 255 IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params) |
| 256 | 256 |
| 257 // Whether the navigation is a POST request (as opposed to a GET). |
| 258 IPC_STRUCT_MEMBER(bool, is_post) |
| 259 |
| 260 // Extra headers (separated by \n) to send during the request. |
| 261 IPC_STRUCT_MEMBER(std::string, extra_headers) |
| 262 |
| 263 // If is_post is true, holds the post_data information from browser. Empty |
| 264 // otherwise. |
| 265 IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data) |
| 266 |
| 257 // The page_id for this navigation, or -1 if it is a new navigation. Back, | 267 // The page_id for this navigation, or -1 if it is a new navigation. Back, |
| 258 // Forward, and Reload navigations should have a valid page_id. If the load | 268 // Forward, and Reload navigations should have a valid page_id. If the load |
| 259 // succeeds, then this page_id will be reflected in the resultant | 269 // succeeds, then this page_id will be reflected in the resultant |
| 260 // FrameHostMsg_DidCommitProvisionalLoad message. | 270 // FrameHostMsg_DidCommitProvisionalLoad message. |
| 261 IPC_STRUCT_MEMBER(int32, page_id) | 271 IPC_STRUCT_MEMBER(int32, page_id) |
| 262 | 272 |
| 263 // For history navigations, this is the offset in the history list of the | 273 // For history navigations, this is the offset in the history list of the |
| 264 // pending load. For non-history navigations, this will be ignored. | 274 // pending load. For non-history navigations, this will be ignored. |
| 265 IPC_STRUCT_MEMBER(int, pending_history_list_offset) | 275 IPC_STRUCT_MEMBER(int, pending_history_list_offset) |
| 266 | 276 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 IPC_STRUCT_END() | 322 IPC_STRUCT_END() |
| 313 | 323 |
| 314 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) | 324 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
| 315 IPC_STRUCT_MEMBER(GURL, url) | 325 IPC_STRUCT_MEMBER(GURL, url) |
| 316 IPC_STRUCT_MEMBER(content::Referrer, referrer) | 326 IPC_STRUCT_MEMBER(content::Referrer, referrer) |
| 317 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) | 327 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) |
| 318 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) | 328 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
| 319 IPC_STRUCT_MEMBER(bool, user_gesture) | 329 IPC_STRUCT_MEMBER(bool, user_gesture) |
| 320 IPC_STRUCT_END() | 330 IPC_STRUCT_END() |
| 321 | 331 |
| 322 // PlzNavigate | |
| 323 IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavigation_Params) | |
| 324 // TODO(clamy): See if it is possible to define a common struct between this | |
| 325 // IPC and ResourceMsg_Request_Params. | |
| 326 | |
| 327 // The request method: GET, POST, etc. | |
| 328 IPC_STRUCT_MEMBER(std::string, method) | |
| 329 | |
| 330 // Additional HTTP request headers. | |
| 331 IPC_STRUCT_MEMBER(std::string, headers) | |
| 332 | |
| 333 // net::URLRequest load flags (net::LOAD_NORMAL) by default). | |
| 334 IPC_STRUCT_MEMBER(int, load_flags) | |
| 335 | |
| 336 // Optional resource request body (may be null). | |
| 337 IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>, | |
| 338 request_body) | |
| 339 | |
| 340 // True if the request was user initiated. | |
| 341 IPC_STRUCT_MEMBER(bool, has_user_gesture) | |
| 342 IPC_STRUCT_END() | |
| 343 | |
| 344 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 332 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 345 // This message is used for supporting popup menus on Mac OS X and Android using | 333 // This message is used for supporting popup menus on Mac OS X and Android using |
| 346 // native controls. See the FrameHostMsg_ShowPopup message. | 334 // native controls. See the FrameHostMsg_ShowPopup message. |
| 347 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) | 335 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) |
| 348 // Position on the screen. | 336 // Position on the screen. |
| 349 IPC_STRUCT_MEMBER(gfx::Rect, bounds) | 337 IPC_STRUCT_MEMBER(gfx::Rect, bounds) |
| 350 | 338 |
| 351 // The height of each item in the menu. | 339 // The height of each item in the menu. |
| 352 IPC_STRUCT_MEMBER(int, item_height) | 340 IPC_STRUCT_MEMBER(int, item_height) |
| 353 | 341 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 526 |
| 539 #elif defined(OS_MACOSX) | 527 #elif defined(OS_MACOSX) |
| 540 | 528 |
| 541 // External popup menus. | 529 // External popup menus. |
| 542 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem, | 530 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem, |
| 543 int /* selected index, -1 means no selection */) | 531 int /* selected index, -1 means no selection */) |
| 544 | 532 |
| 545 #endif | 533 #endif |
| 546 | 534 |
| 547 // PlzNavigate | 535 // PlzNavigate |
| 548 // Tells the renderer that a navigation has been requested. | |
| 549 IPC_MESSAGE_ROUTED2(FrameMsg_RequestNavigation, | |
| 550 content::CommonNavigationParams, /* common_params */ | |
| 551 content::RequestNavigationParams /* request_params */) | |
| 552 | |
| 553 // PlzNavigate | |
| 554 // Tells the renderer that a navigation is ready to commit. The renderer should | 536 // Tells the renderer that a navigation is ready to commit. The renderer should |
| 555 // request |stream_url| to get access to the stream containing the body of the | 537 // request |stream_url| to get access to the stream containing the body of the |
| 556 // response. | 538 // response. |
| 557 IPC_MESSAGE_ROUTED4(FrameMsg_CommitNavigation, | 539 IPC_MESSAGE_ROUTED4(FrameMsg_CommitNavigation, |
| 558 content::ResourceResponseHead, /* response */ | 540 content::ResourceResponseHead, /* response */ |
| 559 GURL, /* stream_url */ | 541 GURL, /* stream_url */ |
| 560 content::CommonNavigationParams, /* common_params */ | 542 content::CommonNavigationParams, /* common_params */ |
| 561 content::CommitNavigationParams /* commit_params */) | 543 content::CommitNavigationParams /* commit_params */) |
| 562 | 544 |
| 563 #if defined(ENABLE_PLUGINS) | 545 #if defined(ENABLE_PLUGINS) |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 size_t, /* startOffset */ | 819 size_t, /* startOffset */ |
| 838 size_t /* endOffset */) | 820 size_t /* endOffset */) |
| 839 | 821 |
| 840 // Notifies the browser that the renderer has a pending navigation transition. | 822 // Notifies the browser that the renderer has a pending navigation transition. |
| 841 // The string parameters are all UTF8. | 823 // The string parameters are all UTF8. |
| 842 IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNavigationTransitionData, | 824 IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNavigationTransitionData, |
| 843 FrameHostMsg_AddNavigationTransitionData_Params) | 825 FrameHostMsg_AddNavigationTransitionData_Params) |
| 844 | 826 |
| 845 // PlzNavigate | 827 // PlzNavigate |
| 846 // Tells the browser to perform a navigation. | 828 // Tells the browser to perform a navigation. |
| 847 IPC_MESSAGE_ROUTED2(FrameHostMsg_BeginNavigation, | 829 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeginNavigation, |
| 848 FrameHostMsg_BeginNavigation_Params, | 830 content::CommonNavigationParams, |
| 849 content::CommonNavigationParams) | 831 content::BeginNavigationParams, |
| 832 scoped_refptr<content::ResourceRequestBody>) |
| 850 | 833 |
| 851 // Sent once a paint happens after the first non empty layout. In other words | 834 // Sent once a paint happens after the first non empty layout. In other words |
| 852 // after the frame has painted something. | 835 // after the frame has painted something. |
| 853 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) | 836 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) |
| 854 | 837 |
| 855 // Puts the browser into "tab fullscreen" mode for the sending renderer. | 838 // Puts the browser into "tab fullscreen" mode for the sending renderer. |
| 856 // See the comment in chrome/browser/ui/browser.h for more details. | 839 // See the comment in chrome/browser/ui/browser.h for more details. |
| 857 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */) | 840 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */) |
| 858 | 841 |
| 859 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 842 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 860 | 843 |
| 861 // Message to show/hide a popup menu using native controls. | 844 // Message to show/hide a popup menu using native controls. |
| 862 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 845 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
| 863 FrameHostMsg_ShowPopup_Params) | 846 FrameHostMsg_ShowPopup_Params) |
| 864 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 847 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
| 865 | 848 |
| 866 #endif | 849 #endif |
| OLD | NEW |