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

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

Issue 2903703003: Use wrapper tracing for worklets. (Closed)
Patch Set: fix comments 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
28 29 DECLARE_TRACE_WRAPPERS();
29 void Dispose() final;
30 30
31 void registerAnimator(const String& name, 31 void registerAnimator(const String& name,
32 const ScriptValue& ctorValue, 32 const ScriptValue& ctorValue,
33 ExceptionState&); 33 ExceptionState&);
34 34
35 Animator* CreateInstance(const String& name); 35 Animator* CreateInstance(const String& name);
36 36
37 private: 37 private:
38 AnimationWorkletGlobalScope(const KURL&, 38 AnimationWorkletGlobalScope(const KURL&,
39 const String& user_agent, 39 const String& user_agent,
40 PassRefPtr<SecurityOrigin>, 40 PassRefPtr<SecurityOrigin>,
41 v8::Isolate*, 41 v8::Isolate*,
42 WorkerThread*); 42 WorkerThread*);
43 43
44 typedef HeapHashMap<String, Member<AnimatorDefinition>> DefinitionMap; 44 typedef HeapHashMap<String, TraceWrapperMember<AnimatorDefinition>>
45 DefinitionMap m_animatorDefinitions; 45 DefinitionMap;
46 DefinitionMap animator_definitions_;
46 47
47 typedef HeapVector<Member<Animator>> AnimatorList; 48 typedef HeapVector<TraceWrapperMember<Animator>> AnimatorList;
48 AnimatorList m_animators; 49 AnimatorList animators_;
haraken 2017/05/25 04:22:12 Do you need to trace both animator_definitions_ an
majidvp 2017/05/25 20:16:57 hmmmm, I think it is better to trace them both her
49 }; 50 };
50 51
51 } // namespace blink 52 } // namespace blink
52 53
53 #endif // AnimationWorkletGlobalScope_h 54 #endif // AnimationWorkletGlobalScope_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698