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..d9ba40351e69927fe2813b62200336fffe40347d 100644 |
--- a/Source/core/html/parser/BackgroundHTMLParser.h |
+++ b/Source/core/html/parser/BackgroundHTMLParser.h |
@@ -33,8 +33,10 @@ |
#include "core/html/parser/HTMLSourceTracker.h" |
#include "core/html/parser/HTMLTreeBuilderSimulator.h" |
#include "core/html/parser/XSSAuditorDelegate.h" |
+#include "public/platform/WebParserResourceBridge.h" |
#include "wtf/PassOwnPtr.h" |
#include "wtf/WeakPtr.h" |
+#include <vector> |
abarth-chromium
2013/12/18 18:28:49
wtf/Vector.h
|
namespace WebCore { |
@@ -42,7 +44,7 @@ class HTMLDocumentParser; |
class SharedBuffer; |
class XSSAuditor; |
-class BackgroundHTMLParser { |
+class BackgroundHTMLParser : public blink::WebParserResourceBridge::Peer { |
WTF_MAKE_FAST_ALLOCATED; |
public: |
struct Configuration { |
@@ -51,6 +53,7 @@ public: |
OwnPtr<XSSAuditor> xssAuditor; |
OwnPtr<TokenPreloadScanner> preloadScanner; |
OwnPtr<TextResourceDecoder> decoder; |
+ OwnPtr<blink::WebParserResourceBridge> resourceBridge; |
}; |
static void start(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>); |
@@ -65,6 +68,9 @@ public: |
String unparsedInput; |
}; |
+ // From blink::WebParserResourceBridge::Peer |
+ virtual void OnReceivedData(const char* data, size_t length); |
abarth-chromium
2013/12/18 18:28:49
didReceiveData
|
+ |
void appendBytes(PassOwnPtr<Vector<char> >); |
void setDecoder(PassOwnPtr<TextResourceDecoder>); |
void flush(); |
@@ -72,12 +78,13 @@ public: |
void startedChunkWithCheckpoint(HTMLInputCheckpoint); |
void finish(); |
void stop(); |
+ void resourceFilterAdded(); |
void forcePlaintextForTextDocument(); |
private: |
BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>); |
- ~BackgroundHTMLParser(); |
+ virtual ~BackgroundHTMLParser(); |
void append(const String&); |
void markEndOfFile(); |
@@ -101,7 +108,11 @@ private: |
OwnPtr<XSSAuditor> m_xssAuditor; |
OwnPtr<TokenPreloadScanner> m_preloadScanner; |
OwnPtr<TextResourceDecoder> m_decoder; |
+ OwnPtr<blink::WebParserResourceBridge> m_resourceBridge; |
DocumentEncodingData m_lastSeenEncodingData; |
+ bool m_parserThreadIsStandalone; |
+ typedef std::vector< std::pair<const char*, size_t> > DataQueue; |
abarth-chromium
2013/12/18 18:28:49
Please use a named struct instead of std::pair
|
+ DataQueue m_queuedData; |
}; |
} |