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

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

Issue 2178223002: Refactor Worklet class to use ScriptResource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed redundant ExecutionContext parameter, changed WorkletScriptLoader to inherit from ResourceO… Created 4 years, 4 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 AnimationWorklet_h 5 #ifndef AnimationWorklet_h
6 #define AnimationWorklet_h 6 #define AnimationWorklet_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "modules/worklet/Worklet.h" 9 #include "modules/worklet/Worklet.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LocalFrame;
14 class ThreadedWorkletGlobalScopeProxy; 15 class ThreadedWorkletGlobalScopeProxy;
15 class WorkletGlobalScopeProxy; 16 class WorkletGlobalScopeProxy;
16 17
17 class MODULES_EXPORT AnimationWorklet final : public Worklet { 18 class MODULES_EXPORT AnimationWorklet final : public Worklet {
18 WTF_MAKE_NONCOPYABLE(AnimationWorklet); 19 WTF_MAKE_NONCOPYABLE(AnimationWorklet);
19 public: 20 public:
20 static AnimationWorklet* create(ExecutionContext*); 21 static AnimationWorklet* create(LocalFrame*);
21 ~AnimationWorklet() override; 22 ~AnimationWorklet() override;
22 23
23 WorkletGlobalScopeProxy* workletGlobalScopeProxy() const final; 24 WorkletGlobalScopeProxy* workletGlobalScopeProxy() const final;
24 25
25 DECLARE_VIRTUAL_TRACE(); 26 DECLARE_VIRTUAL_TRACE();
26 27
27 private: 28 private:
28 AnimationWorklet(ExecutionContext*); 29 AnimationWorklet(LocalFrame*);
yhirano 2016/08/01 10:56:27 +explicit
Gleb Lanbin 2016/08/01 19:49:50 Done.
29 30
30 // TODO(ikilpatrick): this will change to a raw ptr once we have a thread. 31 // TODO(ikilpatrick): this will change to a raw ptr once we have a thread.
31 std::unique_ptr<ThreadedWorkletGlobalScopeProxy> m_workletGlobalScopeProxy; 32 std::unique_ptr<ThreadedWorkletGlobalScopeProxy> m_workletGlobalScopeProxy;
32 }; 33 };
33 34
34 } // namespace blink 35 } // namespace blink
35 36
36 #endif // AnimationWorklet_h 37 #endif // AnimationWorklet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698