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/MainThreadWorklet.h" | 8 #include "core/workers/Worklet.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "modules/csspaint/PaintWorkletGlobalScopeProxy.h" | 10 #include "modules/csspaint/PaintWorkletGlobalScopeProxy.h" |
11 #include "modules/csspaint/PaintWorkletPendingGeneratorRegistry.h" | 11 #include "modules/csspaint/PaintWorkletPendingGeneratorRegistry.h" |
12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class CSSPaintDefinition; | 16 class CSSPaintDefinition; |
17 class CSSPaintImageGeneratorImpl; | 17 class CSSPaintImageGeneratorImpl; |
18 | 18 |
19 // Manages a paint worklet: | 19 // Manages a paint worklet: |
20 // https://drafts.css-houdini.org/css-paint-api/#dom-css-paintworklet | 20 // https://drafts.css-houdini.org/css-paint-api/#dom-css-paintworklet |
21 class MODULES_EXPORT PaintWorklet final : public MainThreadWorklet { | 21 class MODULES_EXPORT PaintWorklet final : public Worklet { |
22 WTF_MAKE_NONCOPYABLE(PaintWorklet); | 22 WTF_MAKE_NONCOPYABLE(PaintWorklet); |
23 | 23 |
24 public: | 24 public: |
25 static PaintWorklet* Create(LocalFrame*); | 25 static PaintWorklet* Create(LocalFrame*); |
26 ~PaintWorklet() override; | 26 ~PaintWorklet() override; |
27 | 27 |
28 CSSPaintDefinition* FindDefinition(const String& name); | 28 CSSPaintDefinition* FindDefinition(const String& name); |
29 void AddPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*); | 29 void AddPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*); |
30 | 30 |
31 DECLARE_VIRTUAL_TRACE(); | 31 DECLARE_VIRTUAL_TRACE(); |
(...skipping 10 matching lines...) Expand all Loading... |
42 Member<PaintWorkletPendingGeneratorRegistry> pending_generator_registry_; | 42 Member<PaintWorkletPendingGeneratorRegistry> pending_generator_registry_; |
43 | 43 |
44 // TODO(style-dev): Implement the "document paint definition" concept: | 44 // TODO(style-dev): Implement the "document paint definition" concept: |
45 // https://drafts.css-houdini.org/css-paint-api/#document-paint-definition | 45 // https://drafts.css-houdini.org/css-paint-api/#document-paint-definition |
46 // (https://crbug.com/578252) | 46 // (https://crbug.com/578252) |
47 }; | 47 }; |
48 | 48 |
49 } // namespace blink | 49 } // namespace blink |
50 | 50 |
51 #endif // PaintWorklet_h | 51 #endif // PaintWorklet_h |
OLD | NEW |