| 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 "modules/ModulesExport.h" |
| 10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class DOMWindow; | 15 class DOMWindow; |
| 16 class LocalDOMWindow; |
| 16 class PaintWorklet; | 17 class PaintWorklet; |
| 17 class Worklet; | 18 class Worklet; |
| 18 | 19 |
| 19 class MODULES_EXPORT WindowPaintWorklet final | 20 class MODULES_EXPORT WindowPaintWorklet final |
| 20 : public GarbageCollected<WindowPaintWorklet>, | 21 : public GarbageCollected<WindowPaintWorklet>, |
| 21 public Supplement<LocalDOMWindow>, | 22 public Supplement<LocalDOMWindow>, |
| 22 public DOMWindowProperty { | 23 public DOMWindowProperty { |
| 23 USING_GARBAGE_COLLECTED_MIXIN(WindowPaintWorklet); | 24 USING_GARBAGE_COLLECTED_MIXIN(WindowPaintWorklet); |
| 24 | 25 |
| 25 public: | 26 public: |
| 26 static WindowPaintWorklet& from(LocalDOMWindow&); | 27 static WindowPaintWorklet& from(LocalDOMWindow&); |
| 27 static Worklet* paintWorklet(DOMWindow&); | 28 static Worklet* paintWorklet(DOMWindow&); |
| 28 PaintWorklet* paintWorklet(); | 29 PaintWorklet* paintWorklet(); |
| 29 | 30 |
| 30 DECLARE_TRACE(); | 31 DECLARE_TRACE(); |
| 31 | 32 |
| 32 private: | 33 private: |
| 33 explicit WindowPaintWorklet(LocalDOMWindow&); | 34 explicit WindowPaintWorklet(LocalDOMWindow&); |
| 34 static const char* supplementName(); | 35 static const char* supplementName(); |
| 35 | 36 |
| 36 Member<PaintWorklet> m_paintWorklet; | 37 Member<PaintWorklet> m_paintWorklet; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 } // namespace blink | 40 } // namespace blink |
| 40 | 41 |
| 41 #endif // WindowPaintWorklet_h | 42 #endif // WindowPaintWorklet_h |
| OLD | NEW |