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