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 "cc/surfaces/surface_id.h" | 8 #include "cc/surfaces/surface_id.h" |
9 #include "cc/surfaces/surface_sequence.h" | 9 #include "cc/surfaces/surface_sequence.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/common/context_menu_params.h" | 22 #include "content/public/common/context_menu_params.h" |
23 #include "content/public/common/frame_navigate_params.h" | 23 #include "content/public/common/frame_navigate_params.h" |
24 #include "content/public/common/javascript_message_type.h" | 24 #include "content/public/common/javascript_message_type.h" |
25 #include "content/public/common/message_port_types.h" | 25 #include "content/public/common/message_port_types.h" |
26 #include "content/public/common/page_importance_signals.h" | 26 #include "content/public/common/page_importance_signals.h" |
27 #include "content/public/common/page_state.h" | 27 #include "content/public/common/page_state.h" |
28 #include "content/public/common/resource_response.h" | 28 #include "content/public/common/resource_response.h" |
29 #include "content/public/common/three_d_api_types.h" | 29 #include "content/public/common/three_d_api_types.h" |
30 #include "content/public/common/transition_element.h" | 30 #include "content/public/common/transition_element.h" |
31 #include "ipc/ipc_message_macros.h" | 31 #include "ipc/ipc_message_macros.h" |
| 32 #include "ipc/ipc_platform_file.h" |
32 #include "third_party/WebKit/public/platform/WebFocusType.h" | 33 #include "third_party/WebKit/public/platform/WebFocusType.h" |
33 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" | 34 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
34 #include "third_party/WebKit/public/web/WebTreeScopeType.h" | 35 #include "third_party/WebKit/public/web/WebTreeScopeType.h" |
35 #include "ui/gfx/ipc/gfx_param_traits.h" | 36 #include "ui/gfx/ipc/gfx_param_traits.h" |
36 #include "url/gurl.h" | 37 #include "url/gurl.h" |
37 #include "url/origin.h" | 38 #include "url/origin.h" |
38 | 39 |
39 #if defined(ENABLE_PLUGINS) | 40 #if defined(ENABLE_PLUGINS) |
40 #include "content/common/pepper_renderer_instance_data.h" | 41 #include "content/common/pepper_renderer_instance_data.h" |
41 #endif | 42 #endif |
42 | 43 |
43 // Singly-included section for type definitions. | 44 // Singly-included section for type definitions. |
44 #ifndef CONTENT_COMMON_FRAME_MESSAGES_H_ | 45 #ifndef CONTENT_COMMON_FRAME_MESSAGES_H_ |
45 #define CONTENT_COMMON_FRAME_MESSAGES_H_ | 46 #define CONTENT_COMMON_FRAME_MESSAGES_H_ |
46 | 47 |
47 using FrameMsg_GetSerializedHtmlWithLocalLinks_Map = | 48 using FrameMsg_GetSerializedHtmlWithLocalLinks_Map = |
48 std::map<GURL, base::FilePath>; | 49 std::map<GURL, base::FilePath>; |
49 | 50 |
| 51 using FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap = |
| 52 std::map<int, std::string>; |
| 53 |
50 #endif // CONTENT_COMMON_FRAME_MESSAGES_H_ | 54 #endif // CONTENT_COMMON_FRAME_MESSAGES_H_ |
51 | 55 |
52 #undef IPC_MESSAGE_EXPORT | 56 #undef IPC_MESSAGE_EXPORT |
53 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 57 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
54 | 58 |
55 #define IPC_MESSAGE_START FrameMsgStart | 59 #define IPC_MESSAGE_START FrameMsgStart |
56 | 60 |
57 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, | 61 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, |
58 AccessibilityModeOff, | 62 AccessibilityModeOff, |
59 AccessibilityModeComplete) | 63 AccessibilityModeComplete) |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 | 724 |
721 // Request to enumerate and return links to all savable resources in the frame | 725 // Request to enumerate and return links to all savable resources in the frame |
722 // Note: this covers only the immediate frame / doesn't cover subframes. | 726 // Note: this covers only the immediate frame / doesn't cover subframes. |
723 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) | 727 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) |
724 | 728 |
725 // Get html data by serializing the target frame and replacing all resource | 729 // Get html data by serializing the target frame and replacing all resource |
726 // links with a path to the local copy passed in the message payload. | 730 // links with a path to the local copy passed in the message payload. |
727 IPC_MESSAGE_ROUTED1(FrameMsg_GetSerializedHtmlWithLocalLinks, | 731 IPC_MESSAGE_ROUTED1(FrameMsg_GetSerializedHtmlWithLocalLinks, |
728 FrameMsg_GetSerializedHtmlWithLocalLinks_Map) | 732 FrameMsg_GetSerializedHtmlWithLocalLinks_Map) |
729 | 733 |
| 734 // Serialize target frame and its resources into MHTML and write it into the |
| 735 // provided destination file handle. |
| 736 // |
| 737 // When starting generation of a new MHTML document, one needs to start by |
| 738 // sending FrameMsg_SerializeAsMHTML for the *main* frame (main frame needs to |
| 739 // be the first part in the MHTML document + main frame will trigger generation |
| 740 // of the MHTML header). |
| 741 // |
| 742 // The same |mhtml_boundary_marker| should be used for serialization of each |
| 743 // frame (this string will be used as a mime multipart boundary within the mhtml |
| 744 // document). |
| 745 // |
| 746 // For more details about frame to content id map please see |
| 747 // WebPageSerializer::generateMHTMLParts method. |
| 748 // |
| 749 // |is_last_frame| controls whether the serializer in the renderer will |
| 750 // emit the MHTML footer. |
| 751 IPC_MESSAGE_ROUTED5(FrameMsg_SerializeAsMHTML, |
| 752 int /* job_id (used to match responses to requests) */, |
| 753 IPC::PlatformFileForTransit /* destination file handle */, |
| 754 std::string /* mhtml boundary marker */, |
| 755 FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap, |
| 756 bool /* is last frame */) |
| 757 |
730 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, | 758 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, |
731 blink::WebFrameOwnerProperties /* frame_owner_properties */) | 759 blink::WebFrameOwnerProperties /* frame_owner_properties */) |
732 | 760 |
733 // Request to continue running the sequential focus navigation algorithm in | 761 // Request to continue running the sequential focus navigation algorithm in |
734 // this frame. |source_routing_id| identifies the frame that issued this | 762 // this frame. |source_routing_id| identifies the frame that issued this |
735 // request. This message is sent when pressing <tab> or <shift-tab> needs to | 763 // request. This message is sent when pressing <tab> or <shift-tab> needs to |
736 // find the next focusable element in a cross-process frame. | 764 // find the next focusable element in a cross-process frame. |
737 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus, | 765 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus, |
738 blink::WebFocusType /* type */, | 766 blink::WebFocusType /* type */, |
739 int32_t /* source_routing_id */) | 767 int32_t /* source_routing_id */) |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 // Response to FrameMsg_GetSavableResourceLinks in case the frame contains | 1285 // Response to FrameMsg_GetSavableResourceLinks in case the frame contains |
1258 // non-savable content (i.e. from a non-savable scheme) or if there were | 1286 // non-savable content (i.e. from a non-savable scheme) or if there were |
1259 // errors gathering the links. | 1287 // errors gathering the links. |
1260 IPC_MESSAGE_ROUTED0(FrameHostMsg_SavableResourceLinksError) | 1288 IPC_MESSAGE_ROUTED0(FrameHostMsg_SavableResourceLinksError) |
1261 | 1289 |
1262 // Response to FrameMsg_GetSerializedHtmlWithLocalLinks. | 1290 // Response to FrameMsg_GetSerializedHtmlWithLocalLinks. |
1263 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializedHtmlWithLocalLinksResponse, | 1291 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializedHtmlWithLocalLinksResponse, |
1264 std::string /* data buffer */, | 1292 std::string /* data buffer */, |
1265 bool /* end of data? */) | 1293 bool /* end of data? */) |
1266 | 1294 |
| 1295 // Response to FrameMsg_SerializeAsMHTML. |
| 1296 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializeAsMHTMLResponse, |
| 1297 int /* job_id (used to match responses to requests) */, |
| 1298 bool /* true if success, false if error */) |
| 1299 |
1267 // Sent when the renderer updates hint for importance of a tab. | 1300 // Sent when the renderer updates hint for importance of a tab. |
1268 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals, | 1301 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals, |
1269 content::PageImportanceSignals) | 1302 content::PageImportanceSignals) |
1270 | 1303 |
1271 // This message is sent from a RenderFrameProxy when sequential focus | 1304 // This message is sent from a RenderFrameProxy when sequential focus |
1272 // navigation needs to advance into its actual frame. |source_routing_id| | 1305 // navigation needs to advance into its actual frame. |source_routing_id| |
1273 // identifies the frame that issued this request. This is used when pressing | 1306 // identifies the frame that issued this request. This is used when pressing |
1274 // <tab> or <shift-tab> hits an out-of-process iframe when searching for the | 1307 // <tab> or <shift-tab> hits an out-of-process iframe when searching for the |
1275 // next focusable element. | 1308 // next focusable element. |
1276 IPC_MESSAGE_ROUTED2(FrameHostMsg_AdvanceFocus, | 1309 IPC_MESSAGE_ROUTED2(FrameHostMsg_AdvanceFocus, |
1277 blink::WebFocusType /* type */, | 1310 blink::WebFocusType /* type */, |
1278 int32_t /* source_routing_id */) | 1311 int32_t /* source_routing_id */) |
1279 | 1312 |
1280 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1313 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
1281 | 1314 |
1282 // Message to show/hide a popup menu using native controls. | 1315 // Message to show/hide a popup menu using native controls. |
1283 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 1316 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
1284 FrameHostMsg_ShowPopup_Params) | 1317 FrameHostMsg_ShowPopup_Params) |
1285 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 1318 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
1286 | 1319 |
1287 #endif | 1320 #endif |
1288 | 1321 |
1289 // Adding a new message? Stick to the sort order above: first platform | 1322 // Adding a new message? Stick to the sort order above: first platform |
1290 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1323 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1291 // platform independent FrameHostMsg, then ifdefs for platform specific | 1324 // platform independent FrameHostMsg, then ifdefs for platform specific |
1292 // FrameHostMsg. | 1325 // FrameHostMsg. |
OLD | NEW |