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

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

Issue 1373573002: ABANDONED: OOPIFs: Moving stitching of local paths from renderer to browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page-serialization-recursive-begone
Patch Set: Removed no longer needed WebKit dependency. Created 5 years, 2 months 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/WebPageSerializerClient.h
diff --git a/third_party/WebKit/public/web/WebPageSerializerClient.h b/third_party/WebKit/public/web/WebPageSerializerClient.h
index 1a413b075941fbcd101a111dc31e84d2728db4fb..371dd3fba9c915a0dc482d85c44837c8eec52e98 100644
--- a/third_party/WebKit/public/web/WebPageSerializerClient.h
+++ b/third_party/WebKit/public/web/WebPageSerializerClient.h
@@ -34,39 +34,38 @@
namespace blink {
class WebCString;
+class WebFrame;
class WebURL;
// This class is used for providing sink interface that can be used to receive
// the individual chunks of data to be saved.
class WebPageSerializerClient {
public:
- // This enum indicates This sink interface can receive the individual chunks
- // of serialized data to be saved, so we use values of following enum
- // definition to indicate the serialization status of serializing all html
- // content. If current frame is not complete serialized, call
- // didSerializeDataForFrame with URL of current frame, data, data length and
- // flag CurrentFrameIsNotFinished.
- // If current frame is complete serialized, call didSerializeDataForFrame
- // with URL of current frame, data, data length and flag
- // CurrentFrameIsFinished.
- // If all frames of page are complete serialized, call
- // didSerializeDataForFrame with empty URL, empty data, 0 and flag
- // AllFramesAreFinished.
- enum PageSerializationStatus {
- CurrentFrameIsNotFinished,
- CurrentFrameIsFinished,
- AllFramesAreFinished,
- };
-
- // Receive the individual chunks of serialized and encoded data to be saved.
- // The parameter frameURL specifies what frame the data belongs. The
- // parameter data contains the available data for saving. The parameter
- // status indicates the status of data serialization.
- virtual void didSerializeDataForFrame(const WebURL& frameURL,
- const WebCString& data,
- PageSerializationStatus status) = 0;
WebPageSerializerClient() { }
+ // Called to notify WebPageSerializerClient that the next fragment of
+ // the serialized frame is |data|.
+ virtual void writeHtmlFragment(const WebCString& data) = 0;
+
+ // Called to notify WebPageSerializerClient that the next fragment of
+ // the serialized frame needs to be a local path corresponding to
+ // |subFrame|. WebPageSerializerClient is responsible for mapping
+ // |subFrame| to a local path and making sure it is properly escaped for
+ // inclusion as a value of a double-quoted html attribute.
+ virtual void writeLocalPathForSubFrame(const WebFrame& subFrame) = 0;
ncarter (slow) 2015/10/08 20:57:55 It seems more common for the F in subFrame to not
Łukasz Anforowicz 2015/10/09 16:54:08 Done: - In my changes - In dom_serializer_browse
+
+ // Called to notify WebPageSerializerClient that the next fragment of
+ // the serialized frame needs to be a local path corresponding to
+ // |savableResourceURL|. WebPageSerializerClient is responsible for mapping
+ // |savableResourceURL| to a local path and making sure it is properly
+ // escaped for inclusion as a value of a double-quoted html attribute.
+ virtual void writeLocalPathForSavableResource(
+ const WebURL& savableResourceURL) = 0;
+
+ // Called to notify WebPageSerializerClient that serialization of
+ // the frame has finished (i.e. there is no more data).
+ virtual void endOfFrame() = 0;
+
protected:
virtual ~WebPageSerializerClient() { }
};

Powered by Google App Engine
This is Rietveld 408576698