| 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 PaintWorklet_h | 5 #ifndef PaintWorklet_h |
| 6 #define PaintWorklet_h | 6 #define PaintWorklet_h |
| 7 | 7 |
| 8 #include "modules/worklet/Worklet.h" | 8 #include "modules/worklet/Worklet.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class CSSPaintDefinition; |
| 14 class CSSPaintImageGeneratorImpl; |
| 15 class PaintWorkletGlobalScope; |
| 16 |
| 13 class PaintWorklet final : public Worklet { | 17 class PaintWorklet final : public Worklet { |
| 14 WTF_MAKE_NONCOPYABLE(PaintWorklet); | 18 WTF_MAKE_NONCOPYABLE(PaintWorklet); |
| 15 public: | 19 public: |
| 16 static PaintWorklet* create(LocalFrame*, ExecutionContext*); | 20 static PaintWorklet* create(LocalFrame*, ExecutionContext*); |
| 17 ~PaintWorklet() override; | 21 ~PaintWorklet() override; |
| 18 | 22 |
| 19 WorkletGlobalScope* workletGlobalScope() const final { return m_paintWorklet
GlobalScope.get(); } | 23 WorkletGlobalScope* workletGlobalScope() const final; |
| 24 CSSPaintDefinition* findDefinition(const String& name); |
| 25 void addPendingGenerator(const String& name, PassRefPtrWillBeRawPtr<CSSPaint
ImageGeneratorImpl>); |
| 20 | 26 |
| 21 DECLARE_VIRTUAL_TRACE(); | 27 DECLARE_VIRTUAL_TRACE(); |
| 22 | 28 |
| 23 private: | 29 private: |
| 24 PaintWorklet(LocalFrame*, ExecutionContext*); | 30 PaintWorklet(LocalFrame*, ExecutionContext*); |
| 25 | 31 |
| 26 RefPtrWillBeMember<WorkletGlobalScope> m_paintWorkletGlobalScope; | 32 RefPtrWillBeMember<PaintWorkletGlobalScope> m_paintWorkletGlobalScope; |
| 27 }; | 33 }; |
| 28 | 34 |
| 29 } // namespace blink | 35 } // namespace blink |
| 30 | 36 |
| 31 #endif // PaintWorklet_h | 37 #endif // PaintWorklet_h |
| OLD | NEW |