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/web/WebFrameOwnerProperties.h" | 33 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
33 #include "third_party/WebKit/public/web/WebTreeScopeType.h" | 34 #include "third_party/WebKit/public/web/WebTreeScopeType.h" |
34 #include "ui/gfx/ipc/gfx_param_traits.h" | 35 #include "ui/gfx/ipc/gfx_param_traits.h" |
35 #include "url/gurl.h" | 36 #include "url/gurl.h" |
36 #include "url/origin.h" | 37 #include "url/origin.h" |
37 | 38 |
38 #if defined(ENABLE_PLUGINS) | 39 #if defined(ENABLE_PLUGINS) |
39 #include "content/common/pepper_renderer_instance_data.h" | 40 #include "content/common/pepper_renderer_instance_data.h" |
40 #endif | 41 #endif |
41 | 42 |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
710 // Note: this covers only the immediate frame / doesn't cover subframes. | 711 // Note: this covers only the immediate frame / doesn't cover subframes. |
711 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) | 712 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) |
712 | 713 |
713 // Get html data by serializing the target frame and replacing all resource | 714 // Get html data by serializing the target frame and replacing all resource |
714 // links with a path to the local copy passed in the message payload. | 715 // links with a path to the local copy passed in the message payload. |
715 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks, | 716 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks, |
716 std::vector<GURL> /* urls that have local copy */, | 717 std::vector<GURL> /* urls that have local copy */, |
717 std::vector<base::FilePath> /* paths of local copy */, | 718 std::vector<base::FilePath> /* paths of local copy */, |
718 base::FilePath /* local directory path */) | 719 base::FilePath /* local directory path */) |
719 | 720 |
721 // Serialize target frame and its resources into MHTML and write it into the | |
722 // provided destination file handle. | |
723 // | |
724 // When starting generation of a new MHTML document, one needs to start by | |
725 // sending FrameMsg_SerializeAsMHTML for the *main* frame (when handling the | |
726 // main frame, the renderer generates MHTML header + mhtml boundary marker). | |
727 // | |
728 // When serializing the first, main frame of an MHTML document, | |
729 // |mhtml_boundary_marker| should be an empty string. Otherwise it needs to be | |
730 // the marker generated and reported back by the previous | |
731 // FrameHostMsg_SerializeAsMHTMLResponse. | |
ncarter (slow)
2015/12/04 22:54:47
It seems like the back-and-forth for boundary-mark
Łukasz Anforowicz
2015/12/05 00:18:39
Thanks for bringing that up. I am not quite happy
ncarter (slow)
2015/12/07 18:39:57
Yeah, my instinct is also to apply the "if it ain'
| |
732 // | |
733 // For more details about frame to content id map please see | |
734 // WebPageSerializer::generateMHTMLParts method. | |
735 // | |
736 // |is_last_frame| controls whether the serializer in the renderer will | |
737 // emit the MHTML footer. | |
738 using FrameRoutingIdToContentIdMap = std::map<int, std::string>; | |
739 IPC_MESSAGE_ROUTED5(FrameMsg_SerializeAsMHTML, | |
740 int /* job_id (used to match responses to requests) */, | |
741 IPC::PlatformFileForTransit /* destination file handle */, | |
742 std::string /* mhtml boundary marker */, | |
743 FrameRoutingIdToContentIdMap, | |
744 bool /* is last frame */) | |
745 | |
720 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, | 746 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, |
721 blink::WebFrameOwnerProperties /* frame_owner_properties */) | 747 blink::WebFrameOwnerProperties /* frame_owner_properties */) |
722 | 748 |
723 #if defined(ENABLE_PLUGINS) | 749 #if defined(ENABLE_PLUGINS) |
724 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. | 750 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. |
725 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, | 751 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, |
726 std::set<url::Origin> /* origin_whitelist */) | 752 std::set<url::Origin> /* origin_whitelist */) |
727 #endif // defined(ENABLE_PLUGINS) | 753 #endif // defined(ENABLE_PLUGINS) |
728 | 754 |
729 // ----------------------------------------------------------------------------- | 755 // ----------------------------------------------------------------------------- |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1239 // Response to FrameMsg_GetSavableResourceLinks in case the frame contains | 1265 // Response to FrameMsg_GetSavableResourceLinks in case the frame contains |
1240 // non-savable content (i.e. from a non-savable scheme) or if there were | 1266 // non-savable content (i.e. from a non-savable scheme) or if there were |
1241 // errors gathering the links. | 1267 // errors gathering the links. |
1242 IPC_MESSAGE_ROUTED0(FrameHostMsg_SavableResourceLinksError) | 1268 IPC_MESSAGE_ROUTED0(FrameHostMsg_SavableResourceLinksError) |
1243 | 1269 |
1244 // Response to FrameMsg_GetSerializedHtmlWithLocalLinks. | 1270 // Response to FrameMsg_GetSerializedHtmlWithLocalLinks. |
1245 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializedHtmlWithLocalLinksResponse, | 1271 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializedHtmlWithLocalLinksResponse, |
1246 std::string /* data buffer */, | 1272 std::string /* data buffer */, |
1247 bool /* end of data? */) | 1273 bool /* end of data? */) |
1248 | 1274 |
1275 // Response to FrameMsg_SerializeAsMHTML. | |
1276 IPC_MESSAGE_ROUTED3(FrameHostMsg_SerializeAsMHTMLResponse, | |
1277 int /* job_id (used to match responses to requests) */, | |
1278 bool /* true if success, false if error */, | |
1279 std::string /* mhtml boundary marker that was used */) | |
1280 | |
1249 // Sent when the renderer updates hint for importance of a tab. | 1281 // Sent when the renderer updates hint for importance of a tab. |
1250 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals, | 1282 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals, |
1251 content::PageImportanceSignals) | 1283 content::PageImportanceSignals) |
1252 | 1284 |
1253 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1285 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
1254 | 1286 |
1255 // Message to show/hide a popup menu using native controls. | 1287 // Message to show/hide a popup menu using native controls. |
1256 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 1288 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
1257 FrameHostMsg_ShowPopup_Params) | 1289 FrameHostMsg_ShowPopup_Params) |
1258 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 1290 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
1259 | 1291 |
1260 #endif | 1292 #endif |
1261 | 1293 |
1262 // Adding a new message? Stick to the sort order above: first platform | 1294 // Adding a new message? Stick to the sort order above: first platform |
1263 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1295 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1264 // platform independent FrameHostMsg, then ifdefs for platform specific | 1296 // platform independent FrameHostMsg, then ifdefs for platform specific |
1265 // FrameHostMsg. | 1297 // FrameHostMsg. |
OLD | NEW |