| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/timing/PerformanceLongTaskTiming.h" | 5 #include "core/timing/PerformanceLongTaskTiming.h" |
| 6 | 6 |
| 7 #include "core/frame/DOMWindow.h" | 7 #include "core/frame/DOMWindow.h" |
| 8 #include "core/timing/TaskAttributionTiming.h" | 8 #include "core/timing/TaskAttributionTiming.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 PerformanceLongTaskTiming::PerformanceLongTaskTiming(double startTime, | 32 PerformanceLongTaskTiming::PerformanceLongTaskTiming(double startTime, |
| 33 double endTime, | 33 double endTime, |
| 34 String name, | 34 String name, |
| 35 String culpritFrameSrc, | 35 String culpritFrameSrc, |
| 36 String culpritFrameId, | 36 String culpritFrameId, |
| 37 String culpritFrameName) | 37 String culpritFrameName) |
| 38 : PerformanceEntry(name, | 38 : PerformanceEntry(name, |
| 39 "longtask", | 39 "longtask", |
| 40 clampToMillisecond(startTime), | 40 clampToMillisecond(startTime), |
| 41 clampToMillisecond(endTime)) { | 41 clampToMillisecond(endTime)) { |
| 42 // Only one possible name ("frame") currently. | 42 // Only one possible task type exists currently: "script" |
| 43 // Only one possible container type exists currently: "iframe" |
| 43 TaskAttributionTiming* attributionEntry = TaskAttributionTiming::create( | 44 TaskAttributionTiming* attributionEntry = TaskAttributionTiming::create( |
| 44 "frame", culpritFrameSrc, culpritFrameId, culpritFrameName); | 45 "script", "iframe", culpritFrameSrc, culpritFrameId, culpritFrameName); |
| 45 m_attribution.push_back(*attributionEntry); | 46 m_attribution.push_back(*attributionEntry); |
| 46 } | 47 } |
| 47 | 48 |
| 48 PerformanceLongTaskTiming::~PerformanceLongTaskTiming() {} | 49 PerformanceLongTaskTiming::~PerformanceLongTaskTiming() {} |
| 49 | 50 |
| 50 TaskAttributionVector PerformanceLongTaskTiming::attribution() const { | 51 TaskAttributionVector PerformanceLongTaskTiming::attribution() const { |
| 51 return m_attribution; | 52 return m_attribution; |
| 52 } | 53 } |
| 53 | 54 |
| 54 DEFINE_TRACE(PerformanceLongTaskTiming) { | 55 DEFINE_TRACE(PerformanceLongTaskTiming) { |
| 55 visitor->trace(m_attribution); | 56 visitor->trace(m_attribution); |
| 56 PerformanceEntry::trace(visitor); | 57 PerformanceEntry::trace(visitor); |
| 57 } | 58 } |
| 58 | 59 |
| 59 } // namespace blink | 60 } // namespace blink |
| OLD | NEW |