| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 CSSTiming_h |
| 6 #define CSSTiming_h |
| 7 |
| 8 #include "core/dom/Document.h" |
| 9 #include "platform/Supplementable.h" |
| 10 #include "platform/heap/Handle.h" |
| 11 #include "wtf/Noncopyable.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class PaintTiming; |
| 16 |
| 17 class CSSTiming : public GarbageCollectedFinalized<CSSTiming>, |
| 18 public Supplement<Document> { |
| 19 WTF_MAKE_NONCOPYABLE(CSSTiming); |
| 20 USING_GARBAGE_COLLECTED_MIXIN(CSSTiming); |
| 21 |
| 22 public: |
| 23 virtual ~CSSTiming() {} |
| 24 |
| 25 // TODO(csharrison): Also record update style time before first paint. |
| 26 void recordAuthorStyleSheetParseTime(double seconds); |
| 27 |
| 28 double authorStyleSheetParseDurationBeforeFCP() const { |
| 29 return m_parseTimeBeforeFCP; |
| 30 } |
| 31 |
| 32 static CSSTiming& from(Document&); |
| 33 DECLARE_VIRTUAL_TRACE(); |
| 34 |
| 35 private: |
| 36 explicit CSSTiming(Document&); |
| 37 |
| 38 double m_parseTimeBeforeFCP = 0; |
| 39 |
| 40 Member<Document> m_document; |
| 41 Member<PaintTiming> m_paintTiming; |
| 42 }; |
| 43 |
| 44 } // namespace blink |
| 45 |
| 46 #endif // CSSTiming_h |
| OLD | NEW |