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 "core/workers/Worklet.h" | 8 #include "core/workers/MainThreadWorklet.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "modules/csspaint/PaintWorkletGlobalScope.h" | 10 #include "modules/csspaint/PaintWorkletGlobalScope.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 CSSPaintDefinition; | 15 class CSSPaintDefinition; |
16 class CSSPaintImageGeneratorImpl; | 16 class CSSPaintImageGeneratorImpl; |
17 | 17 |
18 class MODULES_EXPORT PaintWorklet final : public Worklet { | 18 class MODULES_EXPORT PaintWorklet final : public MainThreadWorklet { |
19 WTF_MAKE_NONCOPYABLE(PaintWorklet); | 19 WTF_MAKE_NONCOPYABLE(PaintWorklet); |
20 | 20 |
21 public: | 21 public: |
22 static PaintWorklet* Create(LocalFrame*); | 22 static PaintWorklet* Create(LocalFrame*); |
23 ~PaintWorklet() override; | 23 ~PaintWorklet() override; |
24 | 24 |
25 PaintWorkletGlobalScope* GetWorkletGlobalScopeProxy() const final; | 25 PaintWorkletGlobalScope* GetWorkletGlobalScopeProxy() const final; |
26 CSSPaintDefinition* FindDefinition(const String& name); | 26 CSSPaintDefinition* FindDefinition(const String& name); |
27 void AddPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*); | 27 void AddPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*); |
28 | 28 |
29 DECLARE_VIRTUAL_TRACE(); | 29 DECLARE_VIRTUAL_TRACE(); |
30 | 30 |
31 private: | 31 private: |
32 explicit PaintWorklet(LocalFrame*); | 32 explicit PaintWorklet(LocalFrame*); |
33 | 33 |
34 Member<PaintWorkletGlobalScope> paint_worklet_global_scope_; | 34 Member<PaintWorkletGlobalScope> paint_worklet_global_scope_; |
35 }; | 35 }; |
36 | 36 |
37 } // namespace blink | 37 } // namespace blink |
38 | 38 |
39 #endif // PaintWorklet_h | 39 #endif // PaintWorklet_h |
OLD | NEW |