Chromium Code Reviews| 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 us); | |
| 27 | |
| 28 // In microseconds. | |
|
Bryan McQuade
2016/11/04 14:11:30
iirc most of our other fields operate in seconds,
Charlie Harrison
2016/11/04 16:05:19
Done.
| |
| 29 double authorStyleSheetParseDurationBeforeFCP() const { | |
| 30 return m_parseTimeBeforeFCP; | |
| 31 } | |
| 32 | |
| 33 static CSSTiming& from(Document&); | |
| 34 DECLARE_VIRTUAL_TRACE(); | |
| 35 | |
| 36 private: | |
| 37 explicit CSSTiming(Document&); | |
| 38 | |
| 39 // In microseconds. | |
| 40 double m_parseTimeBeforeFCP = 0; | |
| 41 | |
| 42 Member<Document> m_document; | |
| 43 Member<PaintTiming> m_paintTiming; | |
| 44 }; | |
| 45 | |
| 46 } // namespace blink | |
| 47 | |
| 48 #endif // CSSTiming_h | |
| OLD | NEW |