| Index: third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.h
|
| diff --git a/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.h b/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0619098cf75d38499f0fb4cb3c10b41c6875e691
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef DocumentStatisticsCollector_h
|
| +#define DocumentStatisticsCollector_h
|
| +
|
| +namespace WTF {
|
| +class String;
|
| +}
|
| +
|
| +namespace blink {
|
| +
|
| +class Document;
|
| +
|
| +struct DocumentStatistics {
|
| + size_t nodeCount;
|
| + size_t elementCount;
|
| + size_t anchorElementCount;
|
| + size_t formElementCount;
|
| + size_t textContentLength;
|
| + size_t innerTextLength;
|
| +};
|
| +
|
| +class DocumentStatisticsCollector {
|
| +public:
|
| + DocumentStatisticsCollector();
|
| +
|
| + void setReadyToCollect() { m_readyToCollect = true; }
|
| + void collectStatistics(Document&);
|
| +
|
| +private:
|
| + bool m_statisticsCollected : 1;
|
| + bool m_readyToCollect : 1;
|
| +};
|
| +
|
| +}
|
| +
|
| +#endif
|
|
|