Index: third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h |
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h |
index fb48bccdbec20fe9ba20f239a7f58c7503807aa5..b178335516b578e7e6cc7d93bbc802ce49533001 100644 |
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h |
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h |
@@ -11,6 +11,9 @@ |
namespace blink { |
+class CSSPaintDefinition; |
+class ExceptionState; |
+ |
class PaintWorkletGlobalScope : public WorkletGlobalScope { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
@@ -18,10 +21,17 @@ public: |
~PaintWorkletGlobalScope() override; |
bool isPaintWorkletGlobalScope() const final { return true; } |
- void registerPaint(const String&, ScriptValue) { } |
+ void registerPaint(const String& name, const ScriptValue& ctor, ExceptionState&); |
+ |
+ CSSPaintDefinition* findDefinition(const String& name); |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
private: |
PaintWorkletGlobalScope(LocalFrame*, const KURL&, const String& userAgent, PassRefPtr<SecurityOrigin>, v8::Isolate*); |
+ |
+ typedef WillBeHeapHashMap<String, RefPtrWillBeMember<CSSPaintDefinition>> DefinitionMap; |
+ DefinitionMap m_paintDefinitions; |
}; |
DEFINE_TYPE_CASTS(PaintWorkletGlobalScope, ExecutionContext, context, context->isPaintWorkletGlobalScope(), context.isPaintWorkletGlobalScope()); |