Chromium Code Reviews| 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..085fd857f62e744beb4c82f2cbcdecff2bbc73ef 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 |
| + // |savebleResourceURL|. WebPageSerializerClient is responsible for mapping |
|
dcheng
2015/10/05 07:53:08
s/saveble/savable/
Łukasz Anforowicz
2015/10/05 17:57:57
Done.
|
| + // |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() { } |
| }; |