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

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 d5264caa051c4c5fb2d62aae11dbebfc16f98c17..632dd13bd854d28c50a2b7607d12dc7d5ac4d9bb 100644
--- a/third_party/WebKit/public/web/WebPageSerializer.h
+++ b/third_party/WebKit/public/web/WebPageSerializer.h
@@ -66,6 +66,11 @@ public:
BLINK_EXPORT static WebData generateMHTMLHeader(
const WebString& boundary, WebLocalFrame* topLevelFrame);
+ // 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.
//
@@ -78,9 +83,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.
//

Powered by Google App Engine
This is Rietveld 408576698