Index: Source/core/html/parser/BackgroundHTMLParser.h |
diff --git a/Source/core/html/parser/BackgroundHTMLParser.h b/Source/core/html/parser/BackgroundHTMLParser.h |
index f1a76fd000577676c9ef0ea5b580076ebfeb221d..f492515e2b5c73d54ff24a14c09dc1d9997b700d 100644 |
--- a/Source/core/html/parser/BackgroundHTMLParser.h |
+++ b/Source/core/html/parser/BackgroundHTMLParser.h |
@@ -33,7 +33,9 @@ |
#include "core/html/parser/HTMLSourceTracker.h" |
#include "core/html/parser/HTMLTreeBuilderSimulator.h" |
#include "core/html/parser/XSSAuditorDelegate.h" |
+#include "public/platform/WebThreadedResourceProvider.h" |
#include "wtf/PassOwnPtr.h" |
+#include "wtf/Vector.h" |
#include "wtf/WeakPtr.h" |
namespace WebCore { |
@@ -42,7 +44,7 @@ class HTMLDocumentParser; |
class SharedBuffer; |
class XSSAuditor; |
-class BackgroundHTMLParser { |
+class BackgroundHTMLParser : public blink::WebThreadedResourceBackgroundClient { |
WTF_MAKE_FAST_ALLOCATED; |
public: |
struct Configuration { |
@@ -51,6 +53,7 @@ public: |
OwnPtr<XSSAuditor> xssAuditor; |
OwnPtr<TokenPreloadScanner> preloadScanner; |
OwnPtr<TextResourceDecoder> decoder; |
+ OwnPtr<blink::WebThreadedResourceProvider> resourceProvider; |
}; |
static void start(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>); |
@@ -65,6 +68,9 @@ public: |
String unparsedInput; |
}; |
+ // From blink::WebThreadedResourceBackgroundClient |
+ virtual void didReceivedData(const char* data, size_t length); |
abarth-chromium
2014/02/03 21:17:36
OVERRIDE
oystein (OOO til 10th of July)
2014/02/05 00:05:00
Done.
|
+ |
void appendBytes(PassOwnPtr<Vector<char> >); |
void setDecoder(PassOwnPtr<TextResourceDecoder>); |
void flush(); |
@@ -72,18 +78,20 @@ public: |
void startedChunkWithCheckpoint(HTMLInputCheckpoint); |
void finish(); |
void stop(); |
+ void resourceFilterAdded(); |
abarth-chromium
2014/02/03 21:17:36
Blink doesn't know anything about resource filters
oystein (OOO til 10th of July)
2014/02/05 00:05:00
Renamed to "didSwitchedToBackgroundClient" (the na
|
void forcePlaintextForTextDocument(); |
private: |
BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>); |
- ~BackgroundHTMLParser(); |
+ virtual ~BackgroundHTMLParser(); |
void append(const String&); |
void markEndOfFile(); |
void pumpTokenizer(); |
void sendTokensToMainThread(); |
void updateDocument(const String& decodedData); |
+ void flushQueuedData(); |
WeakPtrFactory<BackgroundHTMLParser> m_weakFactory; |
BackgroundHTMLInputStream m_input; |
@@ -101,7 +109,10 @@ private: |
OwnPtr<XSSAuditor> m_xssAuditor; |
OwnPtr<TokenPreloadScanner> m_preloadScanner; |
OwnPtr<TextResourceDecoder> m_decoder; |
+ OwnPtr<blink::WebThreadedResourceProvider> m_resourceProvider; |
DocumentEncodingData m_lastSeenEncodingData; |
+ bool m_receivingDataOnlyFromResourceProvider; |
+ Vector<OwnPtr<Vector<char> > > m_queuedData; |
abarth-chromium
2014/02/03 21:17:36
SharedBuffer?
oystein (OOO til 10th of July)
2014/02/05 00:05:00
Done.
|
}; |
} |