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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/common/frame_messages.h
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 72d675141671f3b92c3f4cb8d3a5ed4c11adafbc..23d68cafff10c2802d5cbd4a5259477dd22ee667 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -29,6 +29,7 @@
#include "content/public/common/three_d_api_types.h"
#include "content/public/common/transition_element.h"
#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_platform_file.h"
#include "third_party/WebKit/public/platform/WebFocusType.h"
#include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
#include "third_party/WebKit/public/web/WebTreeScopeType.h"
@@ -720,6 +721,31 @@ using FrameMsg_GetSerializedHtmlWithLocalLinks_Map =
IPC_MESSAGE_ROUTED1(FrameMsg_GetSerializedHtmlWithLocalLinks,
FrameMsg_GetSerializedHtmlWithLocalLinks_Map);
+// Serialize target frame and its resources into MHTML and write it into the
+// provided destination file handle.
+//
+// When starting generation of a new MHTML document, one needs to start by
+// sending FrameMsg_SerializeAsMHTML for the *main* frame (main frame needs to
+// be the first part in the MHTML document + main frame will trigger generation
+// of the MHTML header).
+//
+// The same |mhtml_boundary_marker| should be used for serialization of each
+// frame (this string will be used as a mime multipart boundary within the mhtml
+// document).
+//
+// For more details about frame to content id map please see
+// WebPageSerializer::generateMHTMLParts method.
+//
+// |is_last_frame| controls whether the serializer in the renderer will
+// 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.
+using FrameRoutingIdToContentIdMap = std::map<int, std::string>;
+IPC_MESSAGE_ROUTED5(FrameMsg_SerializeAsMHTML,
+ int /* job_id (used to match responses to requests) */,
+ IPC::PlatformFileForTransit /* destination file handle */,
+ std::string /* mhtml boundary marker */,
+ FrameRoutingIdToContentIdMap,
+ bool /* is last frame */)
+
IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties,
blink::WebFrameOwnerProperties /* frame_owner_properties */)
@@ -1244,6 +1270,11 @@ IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializedHtmlWithLocalLinksResponse,
std::string /* data buffer */,
bool /* end of data? */)
+// Response to FrameMsg_SerializeAsMHTML.
+IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializeAsMHTMLResponse,
+ int /* job_id (used to match responses to requests) */,
+ bool /* true if success, false if error */)
+
// Sent when the renderer updates hint for importance of a tab.
IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals,
content::PageImportanceSignals)

Powered by Google App Engine
This is Rietveld 408576698