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/timing/DOMWindowPerformance.h" | 6 #include "core/timing/DOMWindowPerformance.h" |
7 | 7 |
8 #include "core/frame/LocalDOMWindow.h" | 8 #include "core/frame/LocalDOMWindow.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/timing/Performance.h" | 10 #include "core/timing/Performance.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 DOMWindowPerformance::DOMWindowPerformance(LocalDOMWindow& window) | 14 DOMWindowPerformance::DOMWindowPerformance(LocalDOMWindow& window) |
15 : DOMWindowProperty(window.frame()) | 15 : DOMWindowProperty(window.frame()) |
16 , m_window(window) | 16 , m_window(window) |
17 { | 17 { |
18 } | 18 } |
19 | 19 |
20 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowPerformance); | 20 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowPerformance); |
21 | 21 |
22 void DOMWindowPerformance::trace(Visitor* visitor) | 22 DEFINE_TRACE(DOMWindowPerformance) |
23 { | 23 { |
24 visitor->trace(m_performance); | 24 visitor->trace(m_performance); |
25 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); | 25 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); |
26 DOMWindowProperty::trace(visitor); | 26 DOMWindowProperty::trace(visitor); |
27 } | 27 } |
28 | 28 |
29 // static | 29 // static |
30 const char* DOMWindowPerformance::supplementName() | 30 const char* DOMWindowPerformance::supplementName() |
31 { | 31 { |
32 return "DOMWindowPerformance"; | 32 return "DOMWindowPerformance"; |
(...skipping 17 matching lines...) Expand all Loading... |
50 } | 50 } |
51 | 51 |
52 Performance* DOMWindowPerformance::performance() | 52 Performance* DOMWindowPerformance::performance() |
53 { | 53 { |
54 if (!m_performance) | 54 if (!m_performance) |
55 m_performance = Performance::create(m_window.frame()); | 55 m_performance = Performance::create(m_window.frame()); |
56 return m_performance.get(); | 56 return m_performance.get(); |
57 } | 57 } |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
OLD | NEW |