| 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 AnimationWorklet_h |
| 6 #define PaintWorklet_h | 6 #define AnimationWorklet_h |
| 7 | 7 |
| 8 #include "modules/ModulesExport.h" | 8 #include "modules/ModulesExport.h" |
| 9 #include "modules/csspaint/PaintWorkletGlobalScope.h" | |
| 10 #include "modules/worklet/Worklet.h" | 9 #include "modules/worklet/Worklet.h" |
| 11 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 12 | 11 |
| 13 namespace blink { | 12 namespace blink { |
| 14 | 13 |
| 15 class CSSPaintDefinition; | 14 class ThreadedWorkletGlobalScopeProxy; |
| 16 class CSSPaintImageGeneratorImpl; | 15 class WorkletGlobalScopeProxy; |
| 17 | 16 |
| 18 class MODULES_EXPORT PaintWorklet final : public Worklet { | 17 class MODULES_EXPORT AnimationWorklet final : public Worklet { |
| 19 WTF_MAKE_NONCOPYABLE(PaintWorklet); | 18 WTF_MAKE_NONCOPYABLE(AnimationWorklet); |
| 20 public: | 19 public: |
| 21 static PaintWorklet* create(LocalFrame*, ExecutionContext*); | 20 static AnimationWorklet* create(ExecutionContext*); |
| 22 ~PaintWorklet() override; | 21 ~AnimationWorklet() override; |
| 23 | 22 |
| 24 PaintWorkletGlobalScope* workletGlobalScopeProxy() const final; | 23 WorkletGlobalScopeProxy* workletGlobalScopeProxy() const final; |
| 25 CSSPaintDefinition* findDefinition(const String& name); | |
| 26 void addPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*); | |
| 27 | 24 |
| 28 DECLARE_VIRTUAL_TRACE(); | 25 DECLARE_VIRTUAL_TRACE(); |
| 29 | 26 |
| 30 private: | 27 private: |
| 31 PaintWorklet(LocalFrame*, ExecutionContext*); | 28 AnimationWorklet(ExecutionContext*); |
| 32 | 29 |
| 33 Member<PaintWorkletGlobalScope> m_paintWorkletGlobalScope; | 30 // TODO(ikilpatrick): this will change to a raw ptr once we have a thread. |
| 31 std::unique_ptr<ThreadedWorkletGlobalScopeProxy> m_workletGlobalScopeProxy; |
| 34 }; | 32 }; |
| 35 | 33 |
| 36 } // namespace blink | 34 } // namespace blink |
| 37 | 35 |
| 38 #endif // PaintWorklet_h | 36 #endif // AnimationWorklet_h |
| OLD | NEW |