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/frame_replication_state.h" |
13 #include "content/common/navigation_gesture.h" | 13 #include "content/common/navigation_gesture.h" |
14 #include "content/common/navigation_params.h" | 14 #include "content/common/navigation_params.h" |
15 #include "content/common/resource_request_body.h" | 15 #include "content/common/resource_request_body.h" |
16 #include "content/public/common/color_suggestion.h" | 16 #include "content/public/common/color_suggestion.h" |
17 #include "content/public/common/common_param_traits.h" | 17 #include "content/public/common/common_param_traits.h" |
18 #include "content/public/common/context_menu_params.h" | 18 #include "content/public/common/context_menu_params.h" |
19 #include "content/public/common/frame_navigate_params.h" | 19 #include "content/public/common/frame_navigate_params.h" |
20 #include "content/public/common/javascript_message_type.h" | 20 #include "content/public/common/javascript_message_type.h" |
| 21 #include "content/public/common/message_port_types.h" |
21 #include "content/public/common/page_state.h" | 22 #include "content/public/common/page_state.h" |
22 #include "content/public/common/resource_response.h" | 23 #include "content/public/common/resource_response.h" |
23 #include "content/public/common/transition_element.h" | 24 #include "content/public/common/transition_element.h" |
24 #include "ipc/ipc_message_macros.h" | 25 #include "ipc/ipc_message_macros.h" |
25 #include "ui/gfx/ipc/gfx_param_traits.h" | 26 #include "ui/gfx/ipc/gfx_param_traits.h" |
26 #include "url/gurl.h" | 27 #include "url/gurl.h" |
27 #include "url/origin.h" | 28 #include "url/origin.h" |
28 | 29 |
29 #undef IPC_MESSAGE_EXPORT | 30 #undef IPC_MESSAGE_EXPORT |
30 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 31 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 IPC_STRUCT_MEMBER(url::Origin, origin) | 199 IPC_STRUCT_MEMBER(url::Origin, origin) |
199 | 200 |
200 // How navigation metrics starting on UI action for this load should be | 201 // How navigation metrics starting on UI action for this load should be |
201 // reported. | 202 // reported. |
202 IPC_STRUCT_MEMBER(FrameMsg_UILoadMetricsReportType::Value, report_type) | 203 IPC_STRUCT_MEMBER(FrameMsg_UILoadMetricsReportType::Value, report_type) |
203 | 204 |
204 // Timestamp at which the UI action that triggered the navigation originated. | 205 // Timestamp at which the UI action that triggered the navigation originated. |
205 IPC_STRUCT_MEMBER(base::TimeTicks, ui_timestamp) | 206 IPC_STRUCT_MEMBER(base::TimeTicks, ui_timestamp) |
206 IPC_STRUCT_END() | 207 IPC_STRUCT_END() |
207 | 208 |
| 209 IPC_STRUCT_BEGIN(FrameMsg_PostMessage_Params) |
| 210 // Whether the data format is supplied as serialized script value, or as |
| 211 // a simple string. If it is a raw string, must be converted from string to a |
| 212 // WebSerializedScriptValue in renderer. |
| 213 IPC_STRUCT_MEMBER(bool, is_data_raw_string) |
| 214 |
| 215 // The serialized script value. |
| 216 IPC_STRUCT_MEMBER(base::string16, data) |
| 217 |
| 218 // When sent to the browser, this is the routing ID of the source frame in |
| 219 // the source process. The browser replaces it with the routing ID of the |
| 220 // equivalent frame proxy in the destination process. |
| 221 IPC_STRUCT_MEMBER(int, source_routing_id) |
| 222 |
| 223 // When sent from the browser, this is the routing ID of the source view in |
| 224 // the destination process. This currently exists only to support legacy |
| 225 // postMessage to Android WebView and will be removed once crbug.com/473258 |
| 226 // is fixed. |
| 227 IPC_STRUCT_MEMBER(int, source_view_routing_id) |
| 228 |
| 229 // The origin of the source frame. |
| 230 IPC_STRUCT_MEMBER(base::string16, source_origin) |
| 231 |
| 232 // The origin for the message's target. |
| 233 IPC_STRUCT_MEMBER(base::string16, target_origin) |
| 234 |
| 235 // Information about the MessagePorts this message contains. |
| 236 IPC_STRUCT_MEMBER(std::vector<content::TransferredMessagePort>, message_ports) |
| 237 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids) |
| 238 IPC_STRUCT_END() |
| 239 |
208 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) | 240 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) |
209 IPC_STRUCT_TRAITS_MEMBER(url) | 241 IPC_STRUCT_TRAITS_MEMBER(url) |
210 IPC_STRUCT_TRAITS_MEMBER(referrer) | 242 IPC_STRUCT_TRAITS_MEMBER(referrer) |
211 IPC_STRUCT_TRAITS_MEMBER(transition) | 243 IPC_STRUCT_TRAITS_MEMBER(transition) |
212 IPC_STRUCT_TRAITS_MEMBER(navigation_type) | 244 IPC_STRUCT_TRAITS_MEMBER(navigation_type) |
213 IPC_STRUCT_TRAITS_MEMBER(allow_download) | 245 IPC_STRUCT_TRAITS_MEMBER(allow_download) |
214 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) | 246 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) |
215 IPC_STRUCT_TRAITS_MEMBER(report_type) | 247 IPC_STRUCT_TRAITS_MEMBER(report_type) |
216 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) | 248 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) |
217 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) | 249 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 | 533 |
502 // Update a proxy's window.name property. Used when the frame's name is | 534 // Update a proxy's window.name property. Used when the frame's name is |
503 // changed in another process. | 535 // changed in another process. |
504 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateName, std::string /* name */) | 536 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateName, std::string /* name */) |
505 | 537 |
506 // Send to the RenderFrame to set text track style settings. | 538 // Send to the RenderFrame to set text track style settings. |
507 // Sent for top-level frames. | 539 // Sent for top-level frames. |
508 IPC_MESSAGE_ROUTED1(FrameMsg_SetTextTrackSettings, | 540 IPC_MESSAGE_ROUTED1(FrameMsg_SetTextTrackSettings, |
509 FrameMsg_TextTrackSettings_Params /* params */) | 541 FrameMsg_TextTrackSettings_Params /* params */) |
510 | 542 |
| 543 // Posts a message from a frame in another process to the current renderer. |
| 544 IPC_MESSAGE_ROUTED1(FrameMsg_PostMessageEvent, FrameMsg_PostMessage_Params) |
| 545 |
511 #if defined(OS_ANDROID) | 546 #if defined(OS_ANDROID) |
512 | 547 |
513 // External popup menus. | 548 // External popup menus. |
514 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems, | 549 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems, |
515 bool /* user canceled the popup */, | 550 bool /* user canceled the popup */, |
516 std::vector<int> /* selected indices */) | 551 std::vector<int> /* selected indices */) |
517 | 552 |
518 #elif defined(OS_MACOSX) | 553 #elif defined(OS_MACOSX) |
519 | 554 |
520 // External popup menus. | 555 // External popup menus. |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 IPC_MESSAGE_ROUTED1(FrameHostMsg_VisualStateResponse, uint64 /* id */) | 881 IPC_MESSAGE_ROUTED1(FrameHostMsg_VisualStateResponse, uint64 /* id */) |
847 | 882 |
848 // Puts the browser into "tab fullscreen" mode for the sending renderer. | 883 // Puts the browser into "tab fullscreen" mode for the sending renderer. |
849 // See the comment in chrome/browser/ui/browser.h for more details. | 884 // See the comment in chrome/browser/ui/browser.h for more details. |
850 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */) | 885 IPC_MESSAGE_ROUTED1(FrameHostMsg_ToggleFullscreen, bool /* enter_fullscreen */) |
851 | 886 |
852 // Dispatch a load event for this frame in the iframe element of an | 887 // Dispatch a load event for this frame in the iframe element of an |
853 // out-of-process parent frame. | 888 // out-of-process parent frame. |
854 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad) | 889 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad) |
855 | 890 |
| 891 // Sent to the browser from a frame proxy to post a message to the frame's |
| 892 // active renderer. |
| 893 IPC_MESSAGE_ROUTED1(FrameHostMsg_RouteMessageEvent, |
| 894 FrameMsg_PostMessage_Params) |
| 895 |
856 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 896 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
857 | 897 |
858 // Message to show/hide a popup menu using native controls. | 898 // Message to show/hide a popup menu using native controls. |
859 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 899 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
860 FrameHostMsg_ShowPopup_Params) | 900 FrameHostMsg_ShowPopup_Params) |
861 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 901 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
862 | 902 |
863 #endif | 903 #endif |
OLD | NEW |