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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h

Issue 2912743002: [WIP] Worklet: Merge MainThreadWorklet and ThreadedWorklet into Worklet
Patch Set: WIP 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h
index 7fb42f479ef70c99439a1feccc5cb8352e47a174..cdf7a66b7fc86b9585501f6b84119ccf0c9c9884 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h
@@ -5,36 +5,30 @@
#ifndef AnimationWorklet_h
#define AnimationWorklet_h
-#include "core/workers/ThreadedWorklet.h"
+#include "core/workers/Worklet.h"
#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
namespace blink {
class LocalFrame;
-class ThreadedWorkletMessagingProxy;
class WorkletGlobalScopeProxy;
-class MODULES_EXPORT AnimationWorklet final : public ThreadedWorklet {
+class MODULES_EXPORT AnimationWorklet final : public Worklet {
WTF_MAKE_NONCOPYABLE(AnimationWorklet);
public:
static AnimationWorklet* Create(LocalFrame*);
~AnimationWorklet() override;
- void Initialize() final;
- bool IsInitialized() const final;
-
- WorkletGlobalScopeProxy* GetWorkletGlobalScopeProxy() const final;
-
DECLARE_VIRTUAL_TRACE();
private:
explicit AnimationWorklet(LocalFrame*);
- // The proxy outlives the worklet as it is used to perform thread shutdown,
- // it deletes itself once this has occured.
- ThreadedWorkletMessagingProxy* worklet_messaging_proxy_;
+ // Implements Worklet.
+ bool NeedsToCreateGlobalScope();
+ std::unique_ptr<WorkletGlobalScopeProxy> CreateGlobalScope();
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698