Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: content/common/frame_messages.h

Issue 1386873003: OOPIFs: Transitioning MHTML generation from view-oriented to frame-oriented. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-generation-mgr-cleanup
Patch Set: Rebasing... Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 // Note: this covers only the immediate frame / doesn't cover subframes. 714 // Note: this covers only the immediate frame / doesn't cover subframes.
714 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 715 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
715 716
716 // Get html data by serializing the target frame and replacing all resource 717 // Get html data by serializing the target frame and replacing all resource
717 // links with a path to the local copy passed in the message payload. 718 // links with a path to the local copy passed in the message payload.
718 using FrameMsg_GetSerializedHtmlWithLocalLinks_Map = 719 using FrameMsg_GetSerializedHtmlWithLocalLinks_Map =
719 std::map<GURL, base::FilePath>; 720 std::map<GURL, base::FilePath>;
720 IPC_MESSAGE_ROUTED1(FrameMsg_GetSerializedHtmlWithLocalLinks, 721 IPC_MESSAGE_ROUTED1(FrameMsg_GetSerializedHtmlWithLocalLinks,
721 FrameMsg_GetSerializedHtmlWithLocalLinks_Map); 722 FrameMsg_GetSerializedHtmlWithLocalLinks_Map);
722 723
724 // Serialize target frame and its resources into MHTML and write it into the
725 // provided destination file handle.
726 //
727 // When starting generation of a new MHTML document, one needs to start by
728 // sending FrameMsg_SerializeAsMHTML for the *main* frame (main frame needs to
729 // be the first part in the MHTML document + main frame will trigger generation
730 // of the MHTML header).
731 //
732 // The same |mhtml_boundary_marker| should be used for serialization of each
733 // frame (this string will be used as a mime multipart boundary within the mhtml
734 // document).
735 //
736 // For more details about frame to content id map please see
737 // WebPageSerializer::generateMHTMLParts method.
738 //
739 // |is_last_frame| controls whether the serializer in the renderer will
740 // emit the MHTML footer.
Randy Smith (Not in Mondays) 2015/12/10 23:07:55 nit, suggestion/question: Why not emit the header/
lukasza 2015/12/11 00:29:03 I wasn't sure about that, but it felt better to ke
ncarter (slow) 2015/12/11 17:21:42 Also, you can't do file IO on the UI thread where
Randy Smith (Not in Mondays) 2015/12/14 02:47:04 Acknowledged.
Randy Smith (Not in Mondays) 2015/12/14 02:47:04 Acknowledged.
741 using FrameRoutingIdToContentIdMap = std::map<int, std::string>;
742 IPC_MESSAGE_ROUTED5(FrameMsg_SerializeAsMHTML,
743 int /* job_id (used to match responses to requests) */,
744 IPC::PlatformFileForTransit /* destination file handle */,
745 std::string /* mhtml boundary marker */,
746 FrameRoutingIdToContentIdMap,
747 bool /* is last frame */)
748
723 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, 749 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties,
724 blink::WebFrameOwnerProperties /* frame_owner_properties */) 750 blink::WebFrameOwnerProperties /* frame_owner_properties */)
725 751
726 // Request to continue running the sequential focus navigation algorithm in 752 // Request to continue running the sequential focus navigation algorithm in
727 // this frame. |source_routing_id| identifies the frame that issued this 753 // this frame. |source_routing_id| identifies the frame that issued this
728 // request. This message is sent when pressing <tab> or <shift-tab> needs to 754 // request. This message is sent when pressing <tab> or <shift-tab> needs to
729 // find the next focusable element in a cross-process frame. 755 // find the next focusable element in a cross-process frame.
730 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus, 756 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus,
731 blink::WebFocusType /* type */, 757 blink::WebFocusType /* type */,
732 int32_t /* source_routing_id */) 758 int32_t /* source_routing_id */)
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 // Response to FrameMsg_GetSavableResourceLinks in case the frame contains 1263 // Response to FrameMsg_GetSavableResourceLinks in case the frame contains
1238 // non-savable content (i.e. from a non-savable scheme) or if there were 1264 // non-savable content (i.e. from a non-savable scheme) or if there were
1239 // errors gathering the links. 1265 // errors gathering the links.
1240 IPC_MESSAGE_ROUTED0(FrameHostMsg_SavableResourceLinksError) 1266 IPC_MESSAGE_ROUTED0(FrameHostMsg_SavableResourceLinksError)
1241 1267
1242 // Response to FrameMsg_GetSerializedHtmlWithLocalLinks. 1268 // Response to FrameMsg_GetSerializedHtmlWithLocalLinks.
1243 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializedHtmlWithLocalLinksResponse, 1269 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializedHtmlWithLocalLinksResponse,
1244 std::string /* data buffer */, 1270 std::string /* data buffer */,
1245 bool /* end of data? */) 1271 bool /* end of data? */)
1246 1272
1273 // Response to FrameMsg_SerializeAsMHTML.
1274 IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializeAsMHTMLResponse,
1275 int /* job_id (used to match responses to requests) */,
1276 bool /* true if success, false if error */)
1277
1247 // Sent when the renderer updates hint for importance of a tab. 1278 // Sent when the renderer updates hint for importance of a tab.
1248 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals, 1279 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals,
1249 content::PageImportanceSignals) 1280 content::PageImportanceSignals)
1250 1281
1251 // This message is sent from a RenderFrameProxy when sequential focus 1282 // This message is sent from a RenderFrameProxy when sequential focus
1252 // navigation needs to advance into its actual frame. |source_routing_id| 1283 // navigation needs to advance into its actual frame. |source_routing_id|
1253 // identifies the frame that issued this request. This is used when pressing 1284 // identifies the frame that issued this request. This is used when pressing
1254 // <tab> or <shift-tab> hits an out-of-process iframe when searching for the 1285 // <tab> or <shift-tab> hits an out-of-process iframe when searching for the
1255 // next focusable element. 1286 // next focusable element.
1256 IPC_MESSAGE_ROUTED2(FrameHostMsg_AdvanceFocus, 1287 IPC_MESSAGE_ROUTED2(FrameHostMsg_AdvanceFocus,
1257 blink::WebFocusType /* type */, 1288 blink::WebFocusType /* type */,
1258 int32_t /* source_routing_id */) 1289 int32_t /* source_routing_id */)
1259 1290
1260 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1291 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1261 1292
1262 // Message to show/hide a popup menu using native controls. 1293 // Message to show/hide a popup menu using native controls.
1263 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, 1294 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
1264 FrameHostMsg_ShowPopup_Params) 1295 FrameHostMsg_ShowPopup_Params)
1265 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) 1296 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
1266 1297
1267 #endif 1298 #endif
1268 1299
1269 // Adding a new message? Stick to the sort order above: first platform 1300 // Adding a new message? Stick to the sort order above: first platform
1270 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1301 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1271 // platform independent FrameHostMsg, then ifdefs for platform specific 1302 // platform independent FrameHostMsg, then ifdefs for platform specific
1272 // FrameHostMsg. 1303 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698