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/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 bool enqueue(std::unique_ptr<HTMLDocumentParser::ParsedChunk>); | 35 bool enqueue(std::unique_ptr<HTMLDocumentParser::ParsedChunk>); |
36 void clear(); | 36 void clear(); |
37 | 37 |
38 void takeAll(Vector<std::unique_ptr<HTMLDocumentParser::ParsedChunk>>&); | 38 void takeAll(Vector<std::unique_ptr<HTMLDocumentParser::ParsedChunk>>&); |
39 size_t peakPendingChunkCount(); | 39 size_t peakPendingChunkCount(); |
40 size_t peakPendingTokenCount(); | 40 size_t peakPendingTokenCount(); |
41 | 41 |
42 private: | 42 private: |
43 ParsedChunkQueue(); | 43 ParsedChunkQueue(); |
44 | 44 |
45 Mutex m_mutex; | 45 std::unique_ptr<Mutex> m_mutex; |
46 Vector<std::unique_ptr<HTMLDocumentParser::ParsedChunk>> m_pendingChunks; | 46 Vector<std::unique_ptr<HTMLDocumentParser::ParsedChunk>> m_pendingChunks; |
47 size_t m_peakPendingChunkCount = 0; | 47 size_t m_peakPendingChunkCount = 0; |
48 size_t m_peakPendingTokenCount = 0; | 48 size_t m_peakPendingTokenCount = 0; |
49 size_t m_pendingTokenCount = 0; | 49 size_t m_pendingTokenCount = 0; |
50 }; | 50 }; |
51 | 51 |
52 } // namespace blink | 52 } // namespace blink |
53 | 53 |
54 #endif | 54 #endif |
OLD | NEW |