Chromium Code Reviews| 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(); |
| } |