OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DocumentStatisticsCollector_h |
| 6 #define DocumentStatisticsCollector_h |
| 7 |
| 8 namespace WTF { |
| 9 class String; |
| 10 } |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class Document; |
| 15 |
| 16 struct DocumentStatistics { |
| 17 size_t nodeCount; |
| 18 size_t elementCount; |
| 19 size_t anchorElementCount; |
| 20 size_t formElementCount; |
| 21 size_t textContentLength; |
| 22 size_t innerTextLength; |
| 23 }; |
| 24 |
| 25 class DocumentStatisticsCollector { |
| 26 public: |
| 27 DocumentStatisticsCollector(); |
| 28 |
| 29 void setReadyToCollect() { m_readyToCollect = true; } |
| 30 void collectStatistics(Document&); |
| 31 |
| 32 private: |
| 33 bool m_statisticsCollected : 1; |
| 34 bool m_readyToCollect : 1; |
| 35 }; |
| 36 |
| 37 } |
| 38 |
| 39 #endif |
OLD | NEW |