OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ParsedChunkQueue_h | 5 #ifndef ParsedChunkQueue_h |
6 #define ParsedChunkQueue_h | 6 #define ParsedChunkQueue_h |
7 | 7 |
8 #include "core/html/parser/HTMLDocumentParser.h" | 8 #include "core/html/parser/HTMLDocumentParser.h" |
9 #include "wtf/Deque.h" | 9 #include "wtf/Deque.h" |
10 #include "wtf/OwnPtr.h" | 10 #include "wtf/OwnPtr.h" |
11 #include "wtf/PassOwnPtr.h" | 11 #include "wtf/PassOwnPtr.h" |
12 #include "wtf/PassRefPtr.h" | 12 #include "wtf/PassRefPtr.h" |
13 #include "wtf/RefPtr.h" | |
14 #include "wtf/ThreadSafeRefCounted.h" | 13 #include "wtf/ThreadSafeRefCounted.h" |
15 #include "wtf/ThreadingPrimitives.h" | 14 #include "wtf/ThreadingPrimitives.h" |
16 #include "wtf/Vector.h" | 15 #include "wtf/Vector.h" |
17 | 16 |
18 namespace blink { | 17 namespace blink { |
19 | 18 |
20 // ParsedChunkQueue is used to transfer parsed HTML token chunks | 19 // ParsedChunkQueue is used to transfer parsed HTML token chunks |
21 // from BackgroundHTMLParser thread to Blink main thread without | 20 // from BackgroundHTMLParser thread to Blink main thread without |
22 // spamming task queue. | 21 // spamming task queue. |
23 // ParsedChunkQueue is accessed from both BackgroundHTMLParser | 22 // ParsedChunkQueue is accessed from both BackgroundHTMLParser |
(...skipping 18 matching lines...) Expand all Loading... |
42 private: | 41 private: |
43 ParsedChunkQueue(); | 42 ParsedChunkQueue(); |
44 | 43 |
45 Mutex m_mutex; | 44 Mutex m_mutex; |
46 Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>> m_pendingChunks; | 45 Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>> m_pendingChunks; |
47 }; | 46 }; |
48 | 47 |
49 } // namespace blink | 48 } // namespace blink |
50 | 49 |
51 #endif | 50 #endif |
OLD | NEW |