| 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" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 { | 30 { |
| 31 return adoptRef(new ParsedChunkQueue); | 31 return adoptRef(new ParsedChunkQueue); |
| 32 } | 32 } |
| 33 | 33 |
| 34 ~ParsedChunkQueue(); | 34 ~ParsedChunkQueue(); |
| 35 | 35 |
| 36 bool enqueue(PassOwnPtr<HTMLDocumentParser::ParsedChunk>); | 36 bool enqueue(PassOwnPtr<HTMLDocumentParser::ParsedChunk>); |
| 37 void clear(); | 37 void clear(); |
| 38 | 38 |
| 39 void takeAll(Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>>&); | 39 void takeAll(Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>>&); |
| 40 size_t peakPendingChunkCount(); |
| 41 size_t peakPendingTokenCount(); |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 ParsedChunkQueue(); | 44 ParsedChunkQueue(); |
| 43 | 45 |
| 44 Mutex m_mutex; | 46 Mutex m_mutex; |
| 45 Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>> m_pendingChunks; | 47 Vector<OwnPtr<HTMLDocumentParser::ParsedChunk>> m_pendingChunks; |
| 48 size_t m_peakPendingChunkCount = 0; |
| 49 size_t m_peakPendingTokenCount = 0; |
| 50 size_t m_pendingTokenCount = 0; |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 } // namespace blink | 53 } // namespace blink |
| 49 | 54 |
| 50 #endif | 55 #endif |
| OLD | NEW |