Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Unified Diff: third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h

Issue 2894233002: [animation-worklet] invoke animate callback on mutation signal (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698