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

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

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: Export CompositorAnimator Created 3 years, 11 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.cpp
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
index 89e497661409a817837a561c80fde17e6cb1e468..00ba3bee5fec17900daf8ede7b4a11a6c775f62d 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp
@@ -5,8 +5,10 @@
#include "modules/compositorworker/AnimationWorklet.h"
#include "bindings/core/v8/V8Binding.h"
+#include "core/dom/AnimationWorkletProxyClient.h"
#include "core/dom/Document.h"
#include "core/frame/LocalFrame.h"
+#include "core/page/ChromeClient.h"
#include "modules/compositorworker/AnimationWorkletMessagingProxy.h"
#include "modules/compositorworker/AnimationWorkletThread.h"
@@ -30,9 +32,15 @@ void AnimationWorklet::initialize() {
DCHECK(!m_workletMessagingProxy);
DCHECK(getExecutionContext());
+ Document* document = toDocument(getExecutionContext());
+ CompositorProxyClient* client =
+ document->frame()->chromeClient().createCompositorProxyClient(
+ CompositorProxyClient::kWorkletClient, document->frame());
+ AnimationWorkletProxyClient* proxyClient =
+ static_cast<AnimationWorkletProxyClient*>(client);
dcheng 2017/01/24 22:56:26 Rather than downcasting here and below, we should
majidvp 2017/01/26 15:00:04 This means adding two methods to more than a few p
m_workletMessagingProxy =
- new AnimationWorkletMessagingProxy(getExecutionContext());
+ new AnimationWorkletMessagingProxy(getExecutionContext(), proxyClient);
m_workletMessagingProxy->initialize();
}

Powered by Google App Engine
This is Rietveld 408576698