Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: Source/core/html/parser/HTMLDocumentParser.h

Issue 74513003: Moved text decoding to the parser thread (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_step25
Patch Set: Removed AtomicString from HTMLMetaCharsetParser Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 21 matching lines...) Expand all
32 #include "core/html/parser/BackgroundHTMLInputStream.h" 32 #include "core/html/parser/BackgroundHTMLInputStream.h"
33 #include "core/html/parser/CompactHTMLToken.h" 33 #include "core/html/parser/CompactHTMLToken.h"
34 #include "core/html/parser/HTMLInputStream.h" 34 #include "core/html/parser/HTMLInputStream.h"
35 #include "core/html/parser/HTMLParserOptions.h" 35 #include "core/html/parser/HTMLParserOptions.h"
36 #include "core/html/parser/HTMLPreloadScanner.h" 36 #include "core/html/parser/HTMLPreloadScanner.h"
37 #include "core/html/parser/HTMLScriptRunnerHost.h" 37 #include "core/html/parser/HTMLScriptRunnerHost.h"
38 #include "core/html/parser/HTMLSourceTracker.h" 38 #include "core/html/parser/HTMLSourceTracker.h"
39 #include "core/html/parser/HTMLToken.h" 39 #include "core/html/parser/HTMLToken.h"
40 #include "core/html/parser/HTMLTokenizer.h" 40 #include "core/html/parser/HTMLTokenizer.h"
41 #include "core/html/parser/HTMLTreeBuilderSimulator.h" 41 #include "core/html/parser/HTMLTreeBuilderSimulator.h"
42 #include "core/html/parser/TextResourceDecoder.h"
42 #include "core/html/parser/XSSAuditor.h" 43 #include "core/html/parser/XSSAuditor.h"
43 #include "core/html/parser/XSSAuditorDelegate.h" 44 #include "core/html/parser/XSSAuditorDelegate.h"
44 #include "platform/text/SegmentedString.h" 45 #include "platform/text/SegmentedString.h"
45 #include "wtf/Deque.h" 46 #include "wtf/Deque.h"
46 #include "wtf/OwnPtr.h" 47 #include "wtf/OwnPtr.h"
47 #include "wtf/WeakPtr.h" 48 #include "wtf/WeakPtr.h"
48 #include "wtf/text/TextPosition.h" 49 #include "wtf/text/TextPosition.h"
49 50
50 namespace WebCore { 51 namespace WebCore {
51 52
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 struct ParsedChunk { 89 struct ParsedChunk {
89 OwnPtr<CompactHTMLTokenStream> tokens; 90 OwnPtr<CompactHTMLTokenStream> tokens;
90 PreloadRequestStream preloads; 91 PreloadRequestStream preloads;
91 XSSInfoStream xssInfos; 92 XSSInfoStream xssInfos;
92 HTMLTokenizer::State tokenizerState; 93 HTMLTokenizer::State tokenizerState;
93 HTMLTreeBuilderSimulator::State treeBuilderState; 94 HTMLTreeBuilderSimulator::State treeBuilderState;
94 HTMLInputCheckpoint inputCheckpoint; 95 HTMLInputCheckpoint inputCheckpoint;
95 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; 96 TokenPreloadScannerCheckpoint preloadScannerCheckpoint;
96 }; 97 };
97 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); 98 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
99 void didReceiveEncodingDataFromBackgroundParser(const DocumentEncodingData&) ;
100
101 virtual void appendBytes(const char* bytes, size_t length) OVERRIDE;
102 virtual void flush() OVERRIDE;
103 virtual void setDecoder(PassOwnPtr<TextResourceDecoder>) OVERRIDE;
98 104
99 protected: 105 protected:
100 virtual void insert(const SegmentedString&) OVERRIDE; 106 virtual void insert(const SegmentedString&) OVERRIDE;
101 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; 107 virtual void append(PassRefPtr<StringImpl>) OVERRIDE;
102 virtual void finish() OVERRIDE; 108 virtual void finish() OVERRIDE;
103 109
104 HTMLDocumentParser(HTMLDocument*, bool reportErrors); 110 HTMLDocumentParser(HTMLDocument*, bool reportErrors);
105 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy); 111 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy);
106 112
107 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); } 113 HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 202
197 bool m_isPinnedToMainThread; 203 bool m_isPinnedToMainThread;
198 bool m_endWasDelayed; 204 bool m_endWasDelayed;
199 bool m_haveBackgroundParser; 205 bool m_haveBackgroundParser;
200 unsigned m_pumpSessionNestingLevel; 206 unsigned m_pumpSessionNestingLevel;
201 }; 207 };
202 208
203 } 209 }
204 210
205 #endif 211 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698