| Index: third_party/WebKit/Source/web/WebPageSerializerImpl.h
|
| diff --git a/third_party/WebKit/Source/web/WebPageSerializerImpl.h b/third_party/WebKit/Source/web/WebPageSerializerImpl.h
|
| index 5c724067fbab5640fa52533e5c5727fb9bea4050..a674413ac08707446b3402fcd8ddf1141a093eb4 100644
|
| --- a/third_party/WebKit/Source/web/WebPageSerializerImpl.h
|
| +++ b/third_party/WebKit/Source/web/WebPageSerializerImpl.h
|
| @@ -70,36 +70,17 @@ public:
|
| // details.
|
| bool serialize();
|
|
|
| - // The parameter specifies which frame need to be serialized.
|
| - // The parameter delegate specifies the pointer of interface
|
| - // DomSerializerDelegate provide sink interface which can receive the
|
| - // individual chunks of data to be saved.
|
| - // The parameter links contain original URLs of all saved links.
|
| - // The parameter local_paths contain corresponding local file paths of all
|
| - // saved links, which matched with vector:links one by one.
|
| - // The parameter local_directory_name is relative path of directory which
|
| - // contain all saved auxiliary files included all sub frames and resources.
|
| - WebPageSerializerImpl(WebFrame* frame,
|
| - WebPageSerializerClient* client,
|
| - const WebVector<WebURL>& links,
|
| - const WebVector<WebString>& localPaths,
|
| - const WebString& localDirectoryName);
|
| + // Creates a serializer to serialize the given frame, sending the data to a
|
| + // client sink interface to consume.
|
| + WebPageSerializerImpl(WebFrame*, WebPageSerializerClient*);
|
|
|
| private:
|
| // Specified frame which need to be serialized;
|
| RawPtrWillBeMember<WebLocalFrameImpl> m_specifiedWebLocalFrameImpl;
|
| // Pointer of WebPageSerializerClient
|
| WebPageSerializerClient* m_client;
|
| - // This hash map is used to map resource URL of original link to its local
|
| - // file path.
|
| - typedef HashMap<WTF::String, WTF::String> LinkLocalPathMap;
|
| - // local_links_ include all pair of local resource path and corresponding
|
| - // original link.
|
| - LinkLocalPathMap m_localLinks;
|
| // Data buffer for saving result of serialized DOM data.
|
| StringBuilder m_dataBuffer;
|
| - // Local directory name of all local resource files.
|
| - WTF::String m_localDirectoryName;
|
|
|
| // Web entities conversion maps.
|
| WebEntities m_htmlEntities;
|
| @@ -108,12 +89,11 @@ private:
|
| class SerializeDomParam {
|
| STACK_ALLOCATED();
|
| public:
|
| - SerializeDomParam(const KURL&, const WTF::TextEncoding&, Document*, const WTF::String& directoryName);
|
| + SerializeDomParam(const KURL&, const WTF::TextEncoding&, Document*);
|
|
|
| const KURL& url;
|
| const WTF::TextEncoding& textEncoding;
|
| RawPtrWillBeMember<Document> document;
|
| - const WTF::String& directoryName;
|
| bool isHTMLDocument; // document.isHTMLDocument()
|
| bool haveSeenDocType;
|
| bool haveAddedCharsetDeclaration;
|
| @@ -159,16 +139,14 @@ private:
|
|
|
| // Flushes the content buffer by encoding and sending the content to the
|
| // WebPageSerializerClient. Content is not flushed if the buffer is not full
|
| - // unless force is 1.
|
| - void encodeAndFlushBuffer(WebPageSerializerClient::PageSerializationStatus status,
|
| - SerializeDomParam* param,
|
| - FlushOption);
|
| + // unless FlushOption::ForceFlush is used.
|
| + void encodeAndFlushBuffer(SerializeDomParam*, FlushOption);
|
| // Serialize open tag of an specified element.
|
| - void openTagToString(Element*,
|
| - SerializeDomParam* param);
|
| + void handleOpenTag(Element*, SerializeDomParam*);
|
| + // Serialize value of URL-containing attribute of the specified element.
|
| + void handleLinkAttr(Element*, SerializeDomParam*, const String& attrValue);
|
| // Serialize end tag of an specified element.
|
| - void endTagToString(Element*,
|
| - SerializeDomParam* param);
|
| + void handleEndTag(Element*, SerializeDomParam*);
|
| // Build content for a specified node
|
| void buildContentForNode(Node*,
|
| SerializeDomParam* param);
|
|
|