Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: third_party/WebKit/Source/core/timing/DOMWindowPerformance.cpp

Issue 2592953004: Replace DOMWindowProperty in core/timing/ with ContextClient (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/timing/DOMWindowPerformance.h" 5 #include "core/timing/DOMWindowPerformance.h"
6 6
7 #include "core/frame/LocalDOMWindow.h" 7 #include "core/frame/LocalDOMWindow.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/timing/Performance.h" 9 #include "core/timing/Performance.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 DOMWindowPerformance::DOMWindowPerformance(LocalDOMWindow& window) 13 DOMWindowPerformance::DOMWindowPerformance(LocalDOMWindow& window)
14 : DOMWindowProperty(window.frame()), m_window(&window) {} 14 : ContextClient(window.frame()), m_window(&window) {}
15 15
16 DEFINE_TRACE(DOMWindowPerformance) { 16 DEFINE_TRACE(DOMWindowPerformance) {
17 visitor->trace(m_window); 17 visitor->trace(m_window);
18 visitor->trace(m_performance); 18 visitor->trace(m_performance);
19 Supplement<LocalDOMWindow>::trace(visitor); 19 Supplement<LocalDOMWindow>::trace(visitor);
20 DOMWindowProperty::trace(visitor); 20 ContextClient::trace(visitor);
21 } 21 }
22 22
23 // static 23 // static
24 const char* DOMWindowPerformance::supplementName() { 24 const char* DOMWindowPerformance::supplementName() {
25 return "DOMWindowPerformance"; 25 return "DOMWindowPerformance";
26 } 26 }
27 27
28 // static 28 // static
29 DOMWindowPerformance& DOMWindowPerformance::from(LocalDOMWindow& window) { 29 DOMWindowPerformance& DOMWindowPerformance::from(LocalDOMWindow& window) {
30 DOMWindowPerformance* supplement = static_cast<DOMWindowPerformance*>( 30 DOMWindowPerformance* supplement = static_cast<DOMWindowPerformance*>(
(...skipping 10 matching lines...) Expand all
41 return from(toLocalDOMWindow(window)).performance(); 41 return from(toLocalDOMWindow(window)).performance();
42 } 42 }
43 43
44 Performance* DOMWindowPerformance::performance() { 44 Performance* DOMWindowPerformance::performance() {
45 if (!m_performance) 45 if (!m_performance)
46 m_performance = Performance::create(m_window->frame()); 46 m_performance = Performance::create(m_window->frame());
47 return m_performance.get(); 47 return m_performance.get();
48 } 48 }
49 49
50 } // namespace blink 50 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698