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

Side by Side 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 unified diff | Download patch
OLDNEW
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 AnimationWorkletGlobalScope_h 5 #ifndef AnimationWorkletGlobalScope_h
6 #define AnimationWorkletGlobalScope_h 6 #define AnimationWorkletGlobalScope_h
7 7
8 #include "bindings/core/v8/ScriptValue.h"
8 #include "core/workers/ThreadedWorkletGlobalScope.h" 9 #include "core/workers/ThreadedWorkletGlobalScope.h"
10 #include "modules/ModulesExport.h"
11 #include "modules/compositorworker/Animator.h"
12 #include "modules/compositorworker/AnimatorDefinition.h"
9 13
10 namespace blink { 14 namespace blink {
11 15
12 class AnimationWorkletGlobalScope : public ThreadedWorkletGlobalScope { 16 class ExceptionState;
17 class WorkerClients;
18
19 class MODULES_EXPORT AnimationWorkletGlobalScope
20 : public ThreadedWorkletGlobalScope {
13 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
14 22
15 public: 23 public:
16 static AnimationWorkletGlobalScope* Create(const KURL&, 24 static AnimationWorkletGlobalScope* Create(const KURL&,
17 const String& user_agent, 25 const String& user_agent,
18 PassRefPtr<SecurityOrigin>, 26 PassRefPtr<SecurityOrigin>,
19 v8::Isolate*, 27 v8::Isolate*,
20 WorkerThread*); 28 WorkerThread*,
29 WorkerClients*);
21 ~AnimationWorkletGlobalScope() override; 30 ~AnimationWorkletGlobalScope() override;
31 DECLARE_TRACE();
32
33 void Dispose() final;
34
35 Animator* CreateInstance(const String& name);
36
37 void Mutate();
38
39 void registerAnimator(const String& name,
40 const ScriptValue& ctorValue,
41 ExceptionState&);
22 42
23 private: 43 private:
24 AnimationWorkletGlobalScope(const KURL&, 44 AnimationWorkletGlobalScope(const KURL&,
25 const String& user_agent, 45 const String& user_agent,
26 PassRefPtr<SecurityOrigin>, 46 PassRefPtr<SecurityOrigin>,
27 v8::Isolate*, 47 v8::Isolate*,
28 WorkerThread*); 48 WorkerThread*);
49
50 typedef HeapHashMap<String, Member<AnimatorDefinition>> DefinitionMap;
51 DefinitionMap m_animatorDefinitions;
52
53 typedef HeapVector<Member<Animator>> AnimatorList;
54 AnimatorList m_animators;
29 }; 55 };
30 56
31 } // namespace blink 57 } // namespace blink
32 58
33 #endif // AnimationWorkletGlobalScope_h 59 #endif // AnimationWorkletGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698