| 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 #ifndef DOMWindowPerformance_h | 5 #ifndef DOMWindowPerformance_h |
| 6 #define DOMWindowPerformance_h | 6 #define DOMWindowPerformance_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/dom/ContextLifecycleObserver.h" | |
| 10 #include "core/frame/LocalDOMWindow.h" | 9 #include "core/frame/LocalDOMWindow.h" |
| 11 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
| 12 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 13 #include "wtf/Noncopyable.h" | 12 #include "wtf/Noncopyable.h" |
| 14 | 13 |
| 15 namespace blink { | 14 namespace blink { |
| 16 | 15 |
| 17 class DOMWindow; | 16 class DOMWindow; |
| 18 class LocalDOMWindow; | |
| 19 class Performance; | 17 class Performance; |
| 20 | 18 |
| 21 class CORE_EXPORT DOMWindowPerformance final | 19 class CORE_EXPORT DOMWindowPerformance final |
| 22 : public GarbageCollected<DOMWindowPerformance>, | 20 : public GarbageCollected<DOMWindowPerformance>, |
| 23 public Supplement<LocalDOMWindow>, | 21 public Supplement<LocalDOMWindow> { |
| 24 public ContextClient { | |
| 25 USING_GARBAGE_COLLECTED_MIXIN(DOMWindowPerformance); | 22 USING_GARBAGE_COLLECTED_MIXIN(DOMWindowPerformance); |
| 26 WTF_MAKE_NONCOPYABLE(DOMWindowPerformance); | 23 WTF_MAKE_NONCOPYABLE(DOMWindowPerformance); |
| 27 | 24 |
| 28 public: | 25 public: |
| 29 static DOMWindowPerformance& from(LocalDOMWindow&); | 26 static DOMWindowPerformance& from(LocalDOMWindow&); |
| 30 static Performance* performance(DOMWindow&); | 27 static Performance* performance(DOMWindow&); |
| 31 | 28 |
| 32 DECLARE_TRACE(); | 29 DECLARE_TRACE(); |
| 33 | 30 |
| 34 private: | 31 private: |
| 35 explicit DOMWindowPerformance(LocalDOMWindow&); | 32 explicit DOMWindowPerformance(LocalDOMWindow&); |
| 36 static const char* supplementName(); | 33 static const char* supplementName(); |
| 37 | 34 |
| 38 Performance* performance(); | 35 Performance* performance(); |
| 39 | 36 |
| 40 // TODO(sof): try to move this direct reference and instead rely on frame(). | |
| 41 Member<LocalDOMWindow> m_window; | |
| 42 Member<Performance> m_performance; | 37 Member<Performance> m_performance; |
| 43 }; | 38 }; |
| 44 | 39 |
| 45 } // namespace blink | 40 } // namespace blink |
| 46 | 41 |
| 47 #endif // DOMWindowPerformance_h | 42 #endif // DOMWindowPerformance_h |
| OLD | NEW |