| 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 "core/dom/DocumentParserTiming.h" | 5 #include "core/dom/DocumentParserTiming.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/loader/DocumentLoader.h" | 8 #include "core/loader/DocumentLoader.h" |
| 9 #include "platform/TraceEvent.h" | 9 #include "platform/TraceEvent.h" |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 return; | 52 return; |
| 53 m_parserBlockedOnScriptLoadDuration += duration; | 53 m_parserBlockedOnScriptLoadDuration += duration; |
| 54 if (scriptInsertedViaDocumentWrite) | 54 if (scriptInsertedViaDocumentWrite) |
| 55 m_parserBlockedOnScriptLoadFromDocumentWriteDuration += duration; | 55 m_parserBlockedOnScriptLoadFromDocumentWriteDuration += duration; |
| 56 notifyDocumentParserTimingChanged(); | 56 notifyDocumentParserTimingChanged(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 DEFINE_TRACE(DocumentParserTiming) | 59 DEFINE_TRACE(DocumentParserTiming) |
| 60 { | 60 { |
| 61 visitor->trace(m_document); | 61 visitor->trace(m_document); |
| 62 Supplement<Document>::trace(visitor); |
| 62 } | 63 } |
| 63 | 64 |
| 64 DocumentParserTiming::DocumentParserTiming(Document& document) | 65 DocumentParserTiming::DocumentParserTiming(Document& document) |
| 65 : m_document(document) | 66 : m_document(document) |
| 66 { | 67 { |
| 67 } | 68 } |
| 68 | 69 |
| 69 void DocumentParserTiming::notifyDocumentParserTimingChanged() | 70 void DocumentParserTiming::notifyDocumentParserTimingChanged() |
| 70 { | 71 { |
| 71 if (m_document->loader()) | 72 if (m_document->loader()) |
| 72 m_document->loader()->didChangePerformanceTiming(); | 73 m_document->loader()->didChangePerformanceTiming(); |
| 73 } | 74 } |
| 74 | 75 |
| 75 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |