| Index: third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h
|
| diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h
|
| index 3f7134d6ebcd09e62ebcadc03cb69c45b445b496..9bff1d1976cbfb4e5d8e86146893f2671dd512a5 100644
|
| --- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h
|
| +++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h
|
| @@ -5,11 +5,19 @@
|
| #ifndef AnimationWorkletGlobalScope_h
|
| #define AnimationWorkletGlobalScope_h
|
|
|
| +#include "bindings/core/v8/ScriptValue.h"
|
| #include "core/workers/ThreadedWorkletGlobalScope.h"
|
| +#include "modules/ModulesExport.h"
|
| +#include "modules/compositorworker/Animator.h"
|
| +#include "modules/compositorworker/AnimatorDefinition.h"
|
|
|
| namespace blink {
|
|
|
| -class AnimationWorkletGlobalScope : public ThreadedWorkletGlobalScope {
|
| +class ExceptionState;
|
| +class WorkerClients;
|
| +
|
| +class MODULES_EXPORT AnimationWorkletGlobalScope
|
| + : public ThreadedWorkletGlobalScope {
|
| DEFINE_WRAPPERTYPEINFO();
|
|
|
| public:
|
| @@ -17,8 +25,20 @@ class AnimationWorkletGlobalScope : public ThreadedWorkletGlobalScope {
|
| const String& user_agent,
|
| PassRefPtr<SecurityOrigin>,
|
| v8::Isolate*,
|
| - WorkerThread*);
|
| + WorkerThread*,
|
| + WorkerClients*);
|
| ~AnimationWorkletGlobalScope() override;
|
| + DECLARE_TRACE();
|
| +
|
| + void Dispose() final;
|
| +
|
| + Animator* CreateInstance(const String& name);
|
| +
|
| + void Mutate();
|
| +
|
| + void registerAnimator(const String& name,
|
| + const ScriptValue& ctorValue,
|
| + ExceptionState&);
|
|
|
| private:
|
| AnimationWorkletGlobalScope(const KURL&,
|
| @@ -26,6 +46,12 @@ class AnimationWorkletGlobalScope : public ThreadedWorkletGlobalScope {
|
| PassRefPtr<SecurityOrigin>,
|
| v8::Isolate*,
|
| WorkerThread*);
|
| +
|
| + typedef HeapHashMap<String, Member<AnimatorDefinition>> DefinitionMap;
|
| + DefinitionMap m_animatorDefinitions;
|
| +
|
| + typedef HeapVector<Member<Animator>> AnimatorList;
|
| + AnimatorList m_animators;
|
| };
|
|
|
| } // namespace blink
|
|
|