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 WindowPaintWorklet_h | 5 #ifndef WindowPaintWorklet_h |
6 #define WindowPaintWorklet_h | 6 #define WindowPaintWorklet_h |
7 | 7 |
8 #include "core/frame/DOMWindowProperty.h" | 8 #include "core/frame/DOMWindowProperty.h" |
| 9 #include "modules/ModulesExport.h" |
9 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
10 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 class DOMWindow; | 15 class DOMWindow; |
15 class ExecutionContext; | 16 class ExecutionContext; |
16 class PaintWorklet; | 17 class PaintWorklet; |
17 class Worklet; | 18 class Worklet; |
18 | 19 |
19 class WindowPaintWorklet final : public NoBaseWillBeGarbageCollected<WindowPaint
Worklet>, public WillBeHeapSupplement<LocalDOMWindow>, public DOMWindowProperty
{ | 20 class MODULES_EXPORT WindowPaintWorklet final : public NoBaseWillBeGarbageCollec
ted<WindowPaintWorklet>, public WillBeHeapSupplement<LocalDOMWindow>, public DOM
WindowProperty { |
20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WindowPaintWorklet); | 21 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WindowPaintWorklet); |
21 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(WindowPaintWorklet); | 22 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(WindowPaintWorklet); |
22 USING_FAST_MALLOC_WILL_BE_REMOVED(WindowPaintWorklet); | 23 USING_FAST_MALLOC_WILL_BE_REMOVED(WindowPaintWorklet); |
23 public: | 24 public: |
24 static WindowPaintWorklet& from(LocalDOMWindow&); | 25 static WindowPaintWorklet& from(LocalDOMWindow&); |
25 static Worklet* paintWorklet(ExecutionContext*, DOMWindow&); | 26 static Worklet* paintWorklet(ExecutionContext*, DOMWindow&); |
26 PaintWorklet* paintWorklet(ExecutionContext*) const; | 27 PaintWorklet* paintWorklet(ExecutionContext*) const; |
27 | 28 |
28 DECLARE_TRACE(); | 29 DECLARE_TRACE(); |
29 | 30 |
30 private: | 31 private: |
31 explicit WindowPaintWorklet(LocalDOMWindow&); | 32 explicit WindowPaintWorklet(LocalDOMWindow&); |
32 static const char* supplementName(); | 33 static const char* supplementName(); |
33 | 34 |
34 mutable PersistentWillBeMember<PaintWorklet> m_paintWorklet; | 35 mutable PersistentWillBeMember<PaintWorklet> m_paintWorklet; |
35 }; | 36 }; |
36 | 37 |
37 } // namespace blink | 38 } // namespace blink |
38 | 39 |
39 #endif // WindowPaintWorklet_h | 40 #endif // WindowPaintWorklet_h |
OLD | NEW |