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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::RequestNavigationParams) |
218 IPC_STRUCT_TRAITS_MEMBER(is_post) | 218 IPC_STRUCT_TRAITS_MEMBER(is_post) |
219 IPC_STRUCT_TRAITS_MEMBER(extra_headers) | 219 IPC_STRUCT_TRAITS_MEMBER(extra_headers) |
220 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) | 220 IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data) |
221 IPC_STRUCT_TRAITS_END() | 221 IPC_STRUCT_TRAITS_END() |
222 | 222 |
| 223 IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams) |
| 224 IPC_STRUCT_TRAITS_MEMBER(method) |
| 225 IPC_STRUCT_TRAITS_MEMBER(headers) |
| 226 IPC_STRUCT_TRAITS_MEMBER(load_flags) |
| 227 IPC_STRUCT_TRAITS_MEMBER(has_user_gesture) |
| 228 IPC_STRUCT_TRAITS_END() |
| 229 |
223 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) | 230 IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams) |
224 IPC_STRUCT_TRAITS_MEMBER(page_state) | 231 IPC_STRUCT_TRAITS_MEMBER(page_state) |
225 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) | 232 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) |
226 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) | 233 IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) |
227 IPC_STRUCT_TRAITS_END() | 234 IPC_STRUCT_TRAITS_END() |
228 | 235 |
229 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) | 236 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) |
230 IPC_STRUCT_TRAITS_MEMBER(origin) | 237 IPC_STRUCT_TRAITS_MEMBER(origin) |
231 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags) | 238 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags) |
232 IPC_STRUCT_TRAITS_MEMBER(name) | 239 IPC_STRUCT_TRAITS_MEMBER(name) |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 IPC_STRUCT_END() | 319 IPC_STRUCT_END() |
313 | 320 |
314 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) | 321 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
315 IPC_STRUCT_MEMBER(GURL, url) | 322 IPC_STRUCT_MEMBER(GURL, url) |
316 IPC_STRUCT_MEMBER(content::Referrer, referrer) | 323 IPC_STRUCT_MEMBER(content::Referrer, referrer) |
317 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) | 324 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) |
318 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) | 325 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
319 IPC_STRUCT_MEMBER(bool, user_gesture) | 326 IPC_STRUCT_MEMBER(bool, user_gesture) |
320 IPC_STRUCT_END() | 327 IPC_STRUCT_END() |
321 | 328 |
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) | 329 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
345 // This message is used for supporting popup menus on Mac OS X and Android using | 330 // This message is used for supporting popup menus on Mac OS X and Android using |
346 // native controls. See the FrameHostMsg_ShowPopup message. | 331 // native controls. See the FrameHostMsg_ShowPopup message. |
347 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) | 332 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) |
348 // Position on the screen. | 333 // Position on the screen. |
349 IPC_STRUCT_MEMBER(gfx::Rect, bounds) | 334 IPC_STRUCT_MEMBER(gfx::Rect, bounds) |
350 | 335 |
351 // The height of each item in the menu. | 336 // The height of each item in the menu. |
352 IPC_STRUCT_MEMBER(int, item_height) | 337 IPC_STRUCT_MEMBER(int, item_height) |
353 | 338 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 | 523 |
539 #elif defined(OS_MACOSX) | 524 #elif defined(OS_MACOSX) |
540 | 525 |
541 // External popup menus. | 526 // External popup menus. |
542 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem, | 527 IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem, |
543 int /* selected index, -1 means no selection */) | 528 int /* selected index, -1 means no selection */) |
544 | 529 |
545 #endif | 530 #endif |
546 | 531 |
547 // PlzNavigate | 532 // 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 | 533 // 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 | 534 // request |stream_url| to get access to the stream containing the body of the |
556 // response. | 535 // response. |
557 IPC_MESSAGE_ROUTED4(FrameMsg_CommitNavigation, | 536 IPC_MESSAGE_ROUTED4(FrameMsg_CommitNavigation, |
558 content::ResourceResponseHead, /* response */ | 537 content::ResourceResponseHead, /* response */ |
559 GURL, /* stream_url */ | 538 GURL, /* stream_url */ |
560 content::CommonNavigationParams, /* common_params */ | 539 content::CommonNavigationParams, /* common_params */ |
561 content::CommitNavigationParams /* commit_params */) | 540 content::CommitNavigationParams /* commit_params */) |
562 | 541 |
563 #if defined(ENABLE_PLUGINS) | 542 #if defined(ENABLE_PLUGINS) |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 size_t, /* startOffset */ | 816 size_t, /* startOffset */ |
838 size_t /* endOffset */) | 817 size_t /* endOffset */) |
839 | 818 |
840 // Notifies the browser that the renderer has a pending navigation transition. | 819 // Notifies the browser that the renderer has a pending navigation transition. |
841 // The string parameters are all UTF8. | 820 // The string parameters are all UTF8. |
842 IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNavigationTransitionData, | 821 IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNavigationTransitionData, |
843 FrameHostMsg_AddNavigationTransitionData_Params) | 822 FrameHostMsg_AddNavigationTransitionData_Params) |
844 | 823 |
845 // PlzNavigate | 824 // PlzNavigate |
846 // Tells the browser to perform a navigation. | 825 // Tells the browser to perform a navigation. |
847 IPC_MESSAGE_ROUTED2(FrameHostMsg_BeginNavigation, | 826 IPC_MESSAGE_ROUTED3(FrameHostMsg_BeginNavigation, |
848 FrameHostMsg_BeginNavigation_Params, | 827 content::CommonNavigationParams, |
849 content::CommonNavigationParams) | 828 content::BeginNavigationParams, |
| 829 scoped_refptr<content::ResourceRequestBody>) |
850 | 830 |
851 // Sent once a paint happens after the first non empty layout. In other words | 831 // Sent once a paint happens after the first non empty layout. In other words |
852 // after the frame has painted something. | 832 // after the frame has painted something. |
853 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) | 833 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint) |
854 | 834 |
855 // Puts the browser into "tab fullscreen" mode for the sending renderer. | 835 // Puts the browser into "tab fullscreen" mode for the sending renderer. |
856 // See the comment in chrome/browser/ui/browser.h for more details. | 836 // See the comment in chrome/browser/ui/browser.h for more details. |
857 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */) | 837 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */) |
858 | 838 |
859 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 839 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
860 | 840 |
861 // Message to show/hide a popup menu using native controls. | 841 // Message to show/hide a popup menu using native controls. |
862 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 842 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
863 FrameHostMsg_ShowPopup_Params) | 843 FrameHostMsg_ShowPopup_Params) |
864 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 844 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
865 | 845 |
866 #endif | 846 #endif |
OLD | NEW |