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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 IPC_STRUCT_MEMBER(url::Origin, origin) | 198 IPC_STRUCT_MEMBER(url::Origin, origin) |
198 | 199 |
199 // How navigation metrics starting on UI action for this load should be | 200 // How navigation metrics starting on UI action for this load should be |
200 // reported. | 201 // reported. |
201 IPC_STRUCT_MEMBER(FrameMsg_UILoadMetricsReportType::Value, report_type) | 202 IPC_STRUCT_MEMBER(FrameMsg_UILoadMetricsReportType::Value, report_type) |
202 | 203 |
203 // Timestamp at which the UI action that triggered the navigation originated. | 204 // Timestamp at which the UI action that triggered the navigation originated. |
204 IPC_STRUCT_MEMBER(base::TimeTicks, ui_timestamp) | 205 IPC_STRUCT_MEMBER(base::TimeTicks, ui_timestamp) |
205 IPC_STRUCT_END() | 206 IPC_STRUCT_END() |
206 | 207 |
| 208 IPC_STRUCT_BEGIN(FrameMsg_PostMessage_Params) |
| 209 // Whether the data format is supplied as serialized script value, or as |
| 210 // a simple string. If it is a raw string, must be converted from string to a |
| 211 // WebSerializedScriptValue in renderer. |
| 212 IPC_STRUCT_MEMBER(bool, is_data_raw_string) |
| 213 |
| 214 // The serialized script value. |
| 215 IPC_STRUCT_MEMBER(base::string16, data) |
| 216 |
| 217 // When sent to the browser, this is the routing ID of the source frame in |
| 218 // the source process. The browser replaces it with the routing ID of the |
| 219 // equivalent frame proxy in the destination process. |
| 220 IPC_STRUCT_MEMBER(int, source_routing_id) |
| 221 |
| 222 // When sent from the browser, this is the routing ID of the source view in |
| 223 // the destination process. This currently exists only to support legacy |
| 224 // postMessage to Android WebView and will be removed once crbug.com/473258 |
| 225 // is fixed. |
| 226 IPC_STRUCT_MEMBER(int, source_view_routing_id) |
| 227 |
| 228 // The origin of the source frame. |
| 229 IPC_STRUCT_MEMBER(base::string16, source_origin) |
| 230 |
| 231 // The origin for the message's target. |
| 232 IPC_STRUCT_MEMBER(base::string16, target_origin) |
| 233 |
| 234 // Information about the MessagePorts this message contains. |
| 235 IPC_STRUCT_MEMBER(std::vector<content::TransferredMessagePort>, message_ports) |
| 236 IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids) |
| 237 IPC_STRUCT_END() |
| 238 |
207 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) | 239 IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams) |
208 IPC_STRUCT_TRAITS_MEMBER(url) | 240 IPC_STRUCT_TRAITS_MEMBER(url) |
209 IPC_STRUCT_TRAITS_MEMBER(referrer) | 241 IPC_STRUCT_TRAITS_MEMBER(referrer) |
210 IPC_STRUCT_TRAITS_MEMBER(transition) | 242 IPC_STRUCT_TRAITS_MEMBER(transition) |
211 IPC_STRUCT_TRAITS_MEMBER(navigation_type) | 243 IPC_STRUCT_TRAITS_MEMBER(navigation_type) |
212 IPC_STRUCT_TRAITS_MEMBER(allow_download) | 244 IPC_STRUCT_TRAITS_MEMBER(allow_download) |
213 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) | 245 IPC_STRUCT_TRAITS_MEMBER(ui_timestamp) |
214 IPC_STRUCT_TRAITS_MEMBER(report_type) | 246 IPC_STRUCT_TRAITS_MEMBER(report_type) |
215 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) | 247 IPC_STRUCT_TRAITS_MEMBER(base_url_for_data_url) |
216 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) | 248 IPC_STRUCT_TRAITS_MEMBER(history_url_for_data_url) |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 // Dispatch a load event in the iframe element containing this frame. | 508 // Dispatch a load event in the iframe element containing this frame. |
477 IPC_MESSAGE_ROUTED0(FrameMsg_DispatchLoad) | 509 IPC_MESSAGE_ROUTED0(FrameMsg_DispatchLoad) |
478 | 510 |
479 // Notifies the frame that its parent has changed the frame's sandbox flags. | 511 // Notifies the frame that its parent has changed the frame's sandbox flags. |
480 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags, content::SandboxFlags) | 512 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags, content::SandboxFlags) |
481 | 513 |
482 // Update a proxy's window.name property. Used when the frame's name is | 514 // Update a proxy's window.name property. Used when the frame's name is |
483 // changed in another process. | 515 // changed in another process. |
484 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateName, std::string /* name */) | 516 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateName, std::string /* name */) |
485 | 517 |
| 518 // Posts a message from a frame in another process to the current renderer. |
| 519 IPC_MESSAGE_ROUTED1(FrameMsg_PostMessageEvent, FrameMsg_PostMessage_Params) |
| 520 |
486 #if defined(OS_ANDROID) | 521 #if defined(OS_ANDROID) |
487 | 522 |
488 // External popup menus. | 523 // External popup menus. |
489 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems, | 524 IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems, |
490 bool /* user canceled the popup */, | 525 bool /* user canceled the popup */, |
491 std::vector<int> /* selected indices */) | 526 std::vector<int> /* selected indices */) |
492 | 527 |
493 #elif defined(OS_MACOSX) | 528 #elif defined(OS_MACOSX) |
494 | 529 |
495 // External popup menus. | 530 // External popup menus. |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 // the frame. | 865 // the frame. |
831 IPC_MESSAGE_ROUTED1(FrameHostMsg_BeforeUnloadHandlersPresent, | 866 IPC_MESSAGE_ROUTED1(FrameHostMsg_BeforeUnloadHandlersPresent, |
832 bool /* present */) | 867 bool /* present */) |
833 IPC_MESSAGE_ROUTED1(FrameHostMsg_UnloadHandlersPresent, | 868 IPC_MESSAGE_ROUTED1(FrameHostMsg_UnloadHandlersPresent, |
834 bool /* present */) | 869 bool /* present */) |
835 | 870 |
836 // Dispatch a load event for this frame in the iframe element of an | 871 // Dispatch a load event for this frame in the iframe element of an |
837 // out-of-process parent frame. | 872 // out-of-process parent frame. |
838 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad) | 873 IPC_MESSAGE_ROUTED0(FrameHostMsg_DispatchLoad) |
839 | 874 |
| 875 // Sent to the browser from a frame proxy to post a message to the frame's |
| 876 // active renderer. |
| 877 IPC_MESSAGE_ROUTED1(FrameHostMsg_RouteMessageEvent, |
| 878 FrameMsg_PostMessage_Params) |
| 879 |
840 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 880 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
841 | 881 |
842 // Message to show/hide a popup menu using native controls. | 882 // Message to show/hide a popup menu using native controls. |
843 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 883 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
844 FrameHostMsg_ShowPopup_Params) | 884 FrameHostMsg_ShowPopup_Params) |
845 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 885 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
846 | 886 |
847 #endif | 887 #endif |
OLD | NEW |