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 ce2b683b8e48e34a1b61bce37005ab07fe9cfd36..52bd942841e9f36b8365578bed9104b19dec05b3 100644 |
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h |
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h |
@@ -9,6 +9,7 @@ |
#include "core/dom/ExecutionContext.h" |
#include "core/workers/MainThreadWorkletGlobalScope.h" |
#include "modules/ModulesExport.h" |
+#include "modules/csspaint/PaintWorkletPendingGeneratorRegistry.h" |
#include "platform/graphics/ImageBuffer.h" |
namespace blink { |
@@ -38,6 +39,10 @@ class MODULES_EXPORT PaintWorkletGlobalScope final |
CSSPaintDefinition* FindDefinition(const String& name); |
void AddPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*); |
+ void SetPendingGeneratorRegistry( |
+ PaintWorkletPendingGeneratorRegistry* registry) { |
+ pending_generator_registry_ = registry; |
+ } |
DECLARE_VIRTUAL_TRACE(); |
@@ -51,12 +56,7 @@ class MODULES_EXPORT PaintWorkletGlobalScope final |
typedef HeapHashMap<String, Member<CSSPaintDefinition>> DefinitionMap; |
DefinitionMap paint_definitions_; |
- // The map of CSSPaintImageGeneratorImpl which are waiting for a |
- // CSSPaintDefinition to be registered. The global scope is expected to |
- // outlive the generators hence are held onto with a WeakMember. |
- typedef HeapHashSet<WeakMember<CSSPaintImageGeneratorImpl>> GeneratorHashSet; |
- typedef HeapHashMap<String, Member<GeneratorHashSet>> PendingGeneratorMap; |
- PendingGeneratorMap pending_generators_; |
+ Member<PaintWorkletPendingGeneratorRegistry> pending_generator_registry_; |
}; |
DEFINE_TYPE_CASTS(PaintWorkletGlobalScope, |