Chromium Code Reviews| Index: Source/core/html/parser/BackgroundHTMLParser.h |
| diff --git a/Source/core/html/parser/BackgroundHTMLParser.h b/Source/core/html/parser/BackgroundHTMLParser.h |
| index b9b5a511c49d5ef2ff926353764448aa7ffb06f4..5d20e5548fd5593cad4b5571041ea83cd31387f9 100644 |
| --- a/Source/core/html/parser/BackgroundHTMLParser.h |
| +++ b/Source/core/html/parser/BackgroundHTMLParser.h |
| @@ -31,8 +31,6 @@ |
| #include "core/html/parser/HTMLParserOptions.h" |
| #include "core/html/parser/HTMLPreloadScanner.h" |
| #include "core/html/parser/HTMLSourceTracker.h" |
| -#include "core/html/parser/HTMLToken.h" |
| -#include "core/html/parser/HTMLTokenizer.h" |
| #include "core/html/parser/HTMLTreeBuilderSimulator.h" |
| #include "core/html/parser/XSSAuditorDelegate.h" |
| #include "wtf/PassOwnPtr.h" |
| @@ -41,6 +39,7 @@ |
| namespace WebCore { |
| class HTMLDocumentParser; |
| +class SharedBuffer; |
| class XSSAuditor; |
| class BackgroundHTMLParser { |
| @@ -51,13 +50,10 @@ public: |
| WeakPtr<HTMLDocumentParser> parser; |
| OwnPtr<XSSAuditor> xssAuditor; |
| OwnPtr<TokenPreloadScanner> preloadScanner; |
| + OwnPtr<TextResourceDecoder> decoder; |
| }; |
| - static void create(PassRefPtr<WeakReference<BackgroundHTMLParser> > reference, PassOwnPtr<Configuration> config) |
| - { |
| - new BackgroundHTMLParser(reference, config); |
| - // Caller must free by calling stop(). |
| - } |
| + static void start(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>); |
| struct Checkpoint { |
| WeakPtr<HTMLDocumentParser> parser; |
| @@ -70,6 +66,9 @@ public: |
| }; |
| void append(const String&); |
|
abarth-chromium
2013/12/15 05:50:00
Can we make this function private now?
oystein (OOO til 10th of July)
2013/12/16 19:33:30
Done.
|
| + void appendBytes(PassOwnPtr<Vector<char> >); |
| + void setDecoder(PassOwnPtr<TextResourceDecoder>); |
| + void flush(); |
| void resumeFrom(PassOwnPtr<Checkpoint>); |
| void startedChunkWithCheckpoint(HTMLInputCheckpoint); |
| void finish(); |
| @@ -79,10 +78,12 @@ public: |
| private: |
| BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>); |
| + ~BackgroundHTMLParser(); |
| void markEndOfFile(); |
| void pumpTokenizer(); |
| void sendTokensToMainThread(); |
| + void updateDocument(const String& decodedData); |
| WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; |
| BackgroundHTMLInputStream m_input; |
| @@ -99,6 +100,8 @@ private: |
| OwnPtr<XSSAuditor> m_xssAuditor; |
| OwnPtr<TokenPreloadScanner> m_preloadScanner; |
| + OwnPtr<TextResourceDecoder> m_decoder; |
| + DocumentEncodingData m_lastSeenEncodingData; |
| }; |
| } |