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

Unified Diff: third_party/WebKit/Source/core/page/PageSerializer.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: Introduced MHTMLPartsGenerationDelegate interface. 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/Source/core/page/PageSerializer.h
diff --git a/third_party/WebKit/Source/core/page/PageSerializer.h b/third_party/WebKit/Source/core/page/PageSerializer.h
index bd99edeec83660d23270ec72ad7af4e15a4e9fbf..11df8e9b4b9e9fa69ba457c45106896acc4ab0de 100644
--- a/third_party/WebKit/Source/core/page/PageSerializer.h
+++ b/third_party/WebKit/Source/core/page/PageSerializer.h
@@ -68,7 +68,9 @@ class CORE_EXPORT PageSerializer final {
public:
class Delegate {
public:
- virtual bool shouldIgnoreAttribute(const Attribute&) = 0;
+ // Controls whether HTML serialization should skip the given attribute.
+ // Default implementation always returns false.
dcheng 2015/12/22 01:01:45 Just inline the default implementations.
Łukasz Anforowicz 2015/12/22 21:06:46 Done.
+ virtual bool shouldIgnoreAttribute(const Attribute&);
// Method allowing the Delegate control which URLs are written into the
// generated html document.
@@ -79,7 +81,15 @@ public:
// (i.e. in place of img.src or iframe.src or object.data).
//
// If no link rewriting is desired, this method should return false.
- virtual bool rewriteLink(const Element&, String& rewrittenLink) = 0;
+ //
+ // Default implementation always returns false.
+ virtual bool rewriteLink(const Element&, String& rewrittenLink);
+
+ // Tells whether to skip serialization of a subresource with a given URI.
+ // Used to deduplicate resources across multiple frames.
+ //
+ // Default implementation always returns false.
+ virtual bool shouldSkipResource(const KURL&);
};
// Constructs a serializer that will write output to the given vector of

Powered by Google App Engine
This is Rietveld 408576698