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 2819153003: Worklet: Separate Worklet into MainThreadWorklet and ThreadedWorklet (Closed)
Patch Set: update comments Created 3 years, 8 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 "core/workers/Worklet.h" 8 #include "core/workers/ThreadedWorklet.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.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 LocalFrame;
15 class ThreadedWorkletMessagingProxy; 15 class ThreadedWorkletMessagingProxy;
16 class WorkletGlobalScopeProxy; 16 class WorkletGlobalScopeProxy;
17 17
18 class MODULES_EXPORT AnimationWorklet final : public Worklet { 18 class MODULES_EXPORT AnimationWorklet final : public ThreadedWorklet {
19 WTF_MAKE_NONCOPYABLE(AnimationWorklet); 19 WTF_MAKE_NONCOPYABLE(AnimationWorklet);
20 20
21 public: 21 public:
22 static AnimationWorklet* Create(LocalFrame*); 22 static AnimationWorklet* Create(LocalFrame*);
23 ~AnimationWorklet() override; 23 ~AnimationWorklet() override;
24 24
25 void Initialize() final; 25 void Initialize() final;
26 bool IsInitialized() const final; 26 bool IsInitialized() const final;
27 27
28 WorkletGlobalScopeProxy* GetWorkletGlobalScopeProxy() const final; 28 WorkletGlobalScopeProxy* GetWorkletGlobalScopeProxy() const final;
29 29
30 DECLARE_VIRTUAL_TRACE(); 30 DECLARE_VIRTUAL_TRACE();
31 31
32 private: 32 private:
33 explicit AnimationWorklet(LocalFrame*); 33 explicit AnimationWorklet(LocalFrame*);
34 34
35 // The proxy outlives the worklet as it is used to perform thread shutdown, 35 // The proxy outlives the worklet as it is used to perform thread shutdown,
36 // it deletes itself once this has occured. 36 // it deletes itself once this has occured.
37 ThreadedWorkletMessagingProxy* worklet_messaging_proxy_; 37 ThreadedWorkletMessagingProxy* worklet_messaging_proxy_;
38 }; 38 };
39 39
40 } // namespace blink 40 } // namespace blink
41 41
42 #endif // AnimationWorklet_h 42 #endif // AnimationWorklet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698