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

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

Issue 2312493002: [worklets] Introduce ThreadedWorkletMessagingProxy and AnimationWorkletMessagaingProxy. (Closed)
Patch Set: rebase. Created 4 years, 3 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 c77fd8fe5ecdcdd55ad5dedacdb75c5382f31b4a..40f7e8a36635dcecc26c91b86e38e72698e73eec 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h
@@ -12,7 +12,7 @@
namespace blink {
class LocalFrame;
-class ThreadedWorkletGlobalScopeProxy;
+class ThreadedWorkletMessagingProxy;
class WorkletGlobalScopeProxy;
class MODULES_EXPORT AnimationWorklet final : public Worklet {
@@ -21,6 +21,9 @@ public:
static AnimationWorklet* create(LocalFrame*);
~AnimationWorklet() override;
+ void initialize() final;
+ bool isInitialized() const final;
+
WorkletGlobalScopeProxy* workletGlobalScopeProxy() const final;
DECLARE_VIRTUAL_TRACE();
@@ -28,8 +31,9 @@ public:
private:
explicit AnimationWorklet(LocalFrame*);
- // TODO(ikilpatrick): this will change to a raw ptr once we have a thread.
- std::unique_ptr<ThreadedWorkletGlobalScopeProxy> m_workletGlobalScopeProxy;
+ // The proxy outlives the worklet as it is used to perform thread shutdown,
+ // it deletes itself once this has occured.
+ ThreadedWorkletMessagingProxy* m_workletMessagingProxy;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698