| 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..ad897ce245a79b3cbbadd9fb95992c0d180eb5d1 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;
|
| +
|
| + // 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() { }
|
| };
|
|
|