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

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: Moving "using" declaration under a singly-included section of frame_messges.h 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/frame_messages.h
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 08b733790b778cba291cea0abd2c7ea52f5b239d..3e7e8e4967477bedfcf047b3e54c36230972cf41 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"
@@ -47,6 +48,9 @@
using FrameMsg_GetSerializedHtmlWithLocalLinks_Map =
std::map<GURL, base::FilePath>;
+using FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap =
+ std::map<int, std::string>;
+
#endif // CONTENT_COMMON_FRAME_MESSAGES_H_
#undef IPC_MESSAGE_EXPORT
@@ -727,6 +731,30 @@ IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
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.
+IPC_MESSAGE_ROUTED5(FrameMsg_SerializeAsMHTML,
+ int /* job_id (used to match responses to requests) */,
+ IPC::PlatformFileForTransit /* destination file handle */,
+ std::string /* mhtml boundary marker */,
+ FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap,
+ bool /* is last frame */)
+
IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties,
blink::WebFrameOwnerProperties /* frame_owner_properties */)
@@ -1264,6 +1292,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)
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698