| 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 DOMWindowWorklet_h | 5 #ifndef DOMWindowWorklet_h |
| 6 #define DOMWindowWorklet_h | 6 #define DOMWindowWorklet_h |
| 7 | 7 |
| 8 #include "core/frame/DOMWindowProperty.h" | 8 #include "core/frame/DOMWindowProperty.h" |
| 9 #include "platform/Supplementable.h" | 9 #include "platform/Supplementable.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class DOMWindow; | 14 class DOMWindow; |
| 15 class ExecutionContext; | 15 class ExecutionContext; |
| 16 class Worklet; | 16 class Worklet; |
| 17 | 17 |
| 18 class DOMWindowWorklet final : public NoBaseWillBeGarbageCollected<DOMWindowWork
let>, public WillBeHeapSupplement<LocalDOMWindow>, public DOMWindowProperty { | 18 class DOMWindowWorklet final : public GarbageCollected<DOMWindowWorklet>, public
HeapSupplement<LocalDOMWindow>, public DOMWindowProperty { |
| 19 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMWindowWorklet); | 19 USING_GARBAGE_COLLECTED_MIXIN(DOMWindowWorklet); |
| 20 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(DOMWindowWorklet); | |
| 21 USING_FAST_MALLOC_WILL_BE_REMOVED(DOMWindowWorklet); | |
| 22 public: | 20 public: |
| 23 static DOMWindowWorklet& from(LocalDOMWindow&); | 21 static DOMWindowWorklet& from(LocalDOMWindow&); |
| 24 static Worklet* renderWorklet(ExecutionContext*, DOMWindow&); | 22 static Worklet* renderWorklet(ExecutionContext*, DOMWindow&); |
| 25 Worklet* renderWorklet(ExecutionContext*) const; | 23 Worklet* renderWorklet(ExecutionContext*) const; |
| 26 | 24 |
| 27 DECLARE_TRACE(); | 25 DECLARE_TRACE(); |
| 28 | 26 |
| 29 private: | 27 private: |
| 30 explicit DOMWindowWorklet(LocalDOMWindow&); | 28 explicit DOMWindowWorklet(LocalDOMWindow&); |
| 31 static const char* supplementName(); | 29 static const char* supplementName(); |
| 32 | 30 |
| 33 mutable PersistentWillBeMember<Worklet> m_renderWorklet; | 31 mutable Member<Worklet> m_renderWorklet; |
| 34 }; | 32 }; |
| 35 | 33 |
| 36 } // namespace blink | 34 } // namespace blink |
| 37 | 35 |
| 38 #endif // DOMWindowWorklet_h | 36 #endif // DOMWindowWorklet_h |
| OLD | NEW |