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