Chromium Code Reviews| 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 #ifndef PerformanceLongTaskTiming_h | 5 #ifndef PerformanceLongTaskTiming_h |
| 6 #define PerformanceLongTaskTiming_h | 6 #define PerformanceLongTaskTiming_h |
| 7 | 7 |
| 8 #include "core/timing/PerformanceEntry.h" | 8 #include "core/timing/PerformanceEntry.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/Forward.h" | 10 #include "wtf/Forward.h" |
| 11 #include "wtf/text/WTFString.h" | 11 #include "wtf/text/WTFString.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class Document; | 15 class Document; |
| 16 class DOMWindow; | |
| 16 | 17 |
| 17 class PerformanceLongTaskTiming final : public PerformanceEntry { | 18 class PerformanceLongTaskTiming final : public PerformanceEntry { |
| 18 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
| 19 | 20 |
| 20 public: | 21 public: |
| 21 static PerformanceLongTaskTiming* create(double startTime, | 22 static PerformanceLongTaskTiming* create(double startTime, |
| 22 double endTime, | 23 double endTime, |
| 23 String frameContextUrl) { | 24 String name, |
| 24 return new PerformanceLongTaskTiming(startTime, endTime, frameContextUrl); | 25 DOMWindow* culpritWindow) { |
| 26 return new PerformanceLongTaskTiming(startTime, endTime, name, | |
| 27 culpritWindow); | |
| 25 } | 28 } |
| 26 | 29 |
| 30 DOMWindow* culpritWindow() const; | |
| 31 | |
| 27 DECLARE_VIRTUAL_TRACE(); | 32 DECLARE_VIRTUAL_TRACE(); |
| 28 | 33 |
| 29 private: | 34 private: |
| 30 PerformanceLongTaskTiming(double startTime, | 35 PerformanceLongTaskTiming(double startTime, |
| 31 double endTime, | 36 double endTime, |
| 32 String frameContextUrl); | 37 String name, |
| 38 DOMWindow* culpritWindow); | |
| 33 ~PerformanceLongTaskTiming() override; | 39 ~PerformanceLongTaskTiming() override; |
| 40 | |
| 41 Member<DOMWindow> m_culpritWindow; | |
|
dgozman
2016/10/05 01:21:39
Are we concerned about this entry retaining DOMWin
panicker
2016/10/05 04:11:31
This is a good question, and we did discuss it a f
| |
| 34 }; | 42 }; |
| 35 | 43 |
| 36 } // namespace blink | 44 } // namespace blink |
| 37 | 45 |
| 38 #endif // PerformanceLongTaskTiming_h | 46 #endif // PerformanceLongTaskTiming_h |
| OLD | NEW |