Chromium Code Reviews| 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..072f5b87b0bbf5cf5a5814d710c52dea23aff4b5 100644 |
| --- a/third_party/WebKit/Source/web/WebPageSerializerImpl.h |
| +++ b/third_party/WebKit/Source/web/WebPageSerializerImpl.h |
| @@ -70,36 +70,18 @@ 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 |
| + // The first parameter specifies which frame need to be serialized. |
| + // The second parameter provides a 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); |
| + WebPageSerializerImpl(WebFrame*, WebPageSerializerClient*); |
|
ncarter (slow)
2015/10/08 20:57:55
Why drop the parameter names -- is that just The B
Łukasz Anforowicz
2015/10/09 16:54:08
Yes - this is blink-ism. The error method from pr
dcheng
2015/10/09 16:59:33
Usually, we don't document parameters by position.
Łukasz Anforowicz
2015/10/21 22:50:34
Done.
|
| 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 +90,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 +140,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); |