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 #include "config.h" | 5 #include "config.h" |
6 #include "core/dom/DocumentTiming.h" | 6 #include "core/dom/DocumentTiming.h" |
7 | 7 |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/loader/DocumentLoader.h" | 9 #include "core/loader/DocumentLoader.h" |
10 #include "platform/TraceEvent.h" | 10 #include "platform/TraceEvent.h" |
| 11 #include "wtf/RawPtr.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 DocumentTiming::DocumentTiming(WeakPtrWillBeRawPtr<Document> document) | 15 DocumentTiming::DocumentTiming(RawPtrWillBeMember<Document> document) |
15 : m_domLoading(0.0) | 16 : m_domLoading(0.0) |
16 , m_domInteractive(0.0) | 17 , m_domInteractive(0.0) |
17 , m_domContentLoadedEventStart(0.0) | 18 , m_domContentLoadedEventStart(0.0) |
18 , m_domContentLoadedEventEnd(0.0) | 19 , m_domContentLoadedEventEnd(0.0) |
19 , m_domComplete(0.0) | 20 , m_domComplete(0.0) |
20 , m_firstLayout(0.0) | 21 , m_firstLayout(0.0) |
21 , m_document(document) | 22 , m_document(document) |
22 { | 23 { |
23 } | 24 } |
24 | 25 |
(...skipping 44 matching lines...) Loading... |
69 } | 70 } |
70 | 71 |
71 void DocumentTiming::markFirstLayout() | 72 void DocumentTiming::markFirstLayout() |
72 { | 73 { |
73 m_firstLayout = monotonicallyIncreasingTime(); | 74 m_firstLayout = monotonicallyIncreasingTime(); |
74 TRACE_EVENT_MARK_WITH_TIMESTAMP("blink.user_timing", "firstLayout", m_firstL
ayout); | 75 TRACE_EVENT_MARK_WITH_TIMESTAMP("blink.user_timing", "firstLayout", m_firstL
ayout); |
75 notifyDocumentTimingChanged(); | 76 notifyDocumentTimingChanged(); |
76 } | 77 } |
77 | 78 |
78 } // namespace blink | 79 } // namespace blink |
OLD | NEW |