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

Unified Diff: third_party/WebKit/public/web/WebPageSerializer.h

Issue 1417323006: OOPIFs: Deduplicating MHTML parts across frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-serialization-per-frame
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: third_party/WebKit/public/web/WebPageSerializer.h
diff --git a/third_party/WebKit/public/web/WebPageSerializer.h b/third_party/WebKit/public/web/WebPageSerializer.h
index 7a59b6a82effd69af7bdc65276308c23c32360ba..59052f9ad45503cd7439beaa00f95ebeb40f73df 100644
--- a/third_party/WebKit/public/web/WebPageSerializer.h
+++ b/third_party/WebKit/public/web/WebPageSerializer.h
@@ -63,6 +63,11 @@ public:
BLINK_EXPORT static WebData generateMHTMLHeader(
const WebString& boundary, WebLocalFrame*);
+ // Enumerates and returns URLs of MHTML resources that would be generated
+ // for the given frame by generateMHTMLParts.
+ BLINK_EXPORT static WebVector<WebURL> enumerateMHTMLResources(
+ WebLocalFrame*);
+
// Generates and returns MHTML parts for the given frame and all the
// savable resources underneath.
//
@@ -75,9 +80,13 @@ public:
// See rfc2557 - section 8.3 - "Use of the Content-ID header and CID URLs".
// Format note - |frameToContentID| should contain strings of the form
// "<foo@bar.com>" (i.e. the strings should include the angle brackets).
+ //
+ // |resourcesToSkip| specifies which resources to skip (this skipping
+ // is not applied to the uri of the frame being serialized).
BLINK_EXPORT static WebData generateMHTMLParts(
const WebString& boundary, WebLocalFrame*, bool useBinaryEncoding,
- const WebVector<std::pair<WebFrame*, WebString>>& frameToContentID);
+ const WebVector<std::pair<WebFrame*, WebString>>& frameToContentID,
+ const WebVector<WebURL>& resourcesToSkip);
// Generates and returns an MHTML footer.
//
@@ -92,7 +101,7 @@ public:
// This function will serialize the specified frame to HTML data.
// We have a data buffer to temporary saving generated html data. We will
- // sequentially call WebPageSeriazlierClient once the data buffer is full.
+ // sequentially call WebPageSerializerClient once the data buffer is full.
//
// Return false means if no data has been serialized (i.e. because
// the target frame didn't have a valid url).
« content/renderer/render_frame_impl.cc ('K') | « third_party/WebKit/Source/web/WebPageSerializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698