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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.h

Issue 2903703003: Use wrapper tracing for worklets. (Closed)
Patch Set: Created 3 years, 6 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 "bindings/core/v8/ScriptValue.h"
9 #include "core/workers/ThreadedWorkletGlobalScope.h" 9 #include "core/workers/ThreadedWorkletGlobalScope.h"
10 #include "modules/compositorworker/Animator.h" 10 #include "modules/compositorworker/Animator.h"
11 #include "modules/compositorworker/AnimatorDefinition.h" 11 #include "modules/compositorworker/AnimatorDefinition.h"
12 #include "platform/bindings/ScriptWrappable.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class ExceptionState; 16 class ExceptionState;
16 17
17 class AnimationWorkletGlobalScope : public ThreadedWorkletGlobalScope { 18 class AnimationWorkletGlobalScope : public ThreadedWorkletGlobalScope {
18 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
19 20
20 public: 21 public:
21 static AnimationWorkletGlobalScope* Create(const KURL&, 22 static AnimationWorkletGlobalScope* Create(const KURL&,
22 const String& user_agent, 23 const String& user_agent,
23 PassRefPtr<SecurityOrigin>, 24 PassRefPtr<SecurityOrigin>,
24 v8::Isolate*, 25 v8::Isolate*,
25 WorkerThread*); 26 WorkerThread*);
26 ~AnimationWorkletGlobalScope() override; 27 ~AnimationWorkletGlobalScope() override;
27 DECLARE_TRACE(); 28 DECLARE_TRACE();
29 DECLARE_TRACE_WRAPPERS();
28 30
29 void Dispose() final; 31 void Dispose() final;
30 32
31 void registerAnimator(const String& name, 33 void registerAnimator(const String& name,
32 const ScriptValue& ctorValue, 34 const ScriptValue& ctorValue,
33 ExceptionState&); 35 ExceptionState&);
34 36
35 Animator* CreateInstance(const String& name); 37 Animator* CreateInstance(const String& name);
36 38
37 private: 39 private:
38 AnimationWorkletGlobalScope(const KURL&, 40 AnimationWorkletGlobalScope(const KURL&,
39 const String& user_agent, 41 const String& user_agent,
40 PassRefPtr<SecurityOrigin>, 42 PassRefPtr<SecurityOrigin>,
41 v8::Isolate*, 43 v8::Isolate*,
42 WorkerThread*); 44 WorkerThread*);
43 45
44 typedef HeapHashMap<String, Member<AnimatorDefinition>> DefinitionMap; 46 typedef HeapHashMap<String, TraceWrapperMember<AnimatorDefinition>>
45 DefinitionMap m_animatorDefinitions; 47 DefinitionMap;
48 DefinitionMap animator_definitions_;
46 49
47 typedef HeapVector<Member<Animator>> AnimatorList; 50 typedef HeapVector<TraceWrapperMember<Animator>> AnimatorList;
48 AnimatorList m_animators; 51 AnimatorList animators_;
49 }; 52 };
50 53
51 } // namespace blink 54 } // namespace blink
52 55
53 #endif // AnimationWorkletGlobalScope_h 56 #endif // AnimationWorkletGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698