Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
| index 4f686427e736d2b74b9d810e5e813d769d90a867..b64e2d5fbe631ce690750ce80ede82282f9fe71b 100644 |
| --- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp |
| @@ -58,9 +58,10 @@ |
| #include "public/web/WebPlugin.h" |
| #include "public/web/WebRange.h" |
| #include "public/web/WebWidgetClient.h" |
| +#include "web/AnimationWorkletProxyClientImpl.h" |
| #include "web/CompositionUnderlineVectorBuilder.h" |
| #include "web/CompositorMutatorImpl.h" |
| -#include "web/CompositorProxyClientImpl.h" |
| +#include "web/CompositorWorkerProxyClientImpl.h" |
| #include "web/ContextMenuAllowedScope.h" |
| #include "web/InspectorOverlay.h" |
| #include "web/PageOverlay.h" |
| @@ -416,14 +417,24 @@ void WebFrameWidgetImpl::scheduleAnimation() { |
| m_client->scheduleAnimation(); |
| } |
| -CompositorProxyClient* WebFrameWidgetImpl::createCompositorProxyClient() { |
| +CompositorProxyClient* WebFrameWidgetImpl::createCompositorProxyClient( |
| + CompositorProxyClient::Type type) { |
| if (!m_mutator) { |
| std::unique_ptr<CompositorMutatorClient> mutatorClient = |
| CompositorMutatorImpl::createClient(); |
| m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator()); |
| m_layerTreeView->setMutatorClient(std::move(mutatorClient)); |
| } |
| - return new CompositorProxyClientImpl(m_mutator); |
| + |
| + switch (type) { |
| + case CompositorProxyClient::kWorkerClient: |
|
dcheng
2017/01/24 22:56:26
Internally, we can just share |m_mutator| initiali
|
| + return new CompositorWorkerProxyClientImpl(m_mutator); |
| + case CompositorProxyClient::kWorkletClient: |
| + return new AnimationWorkletProxyClientImpl(m_mutator); |
| + } |
| + |
| + NOTREACHED() << "Unexpected CompositorProxyClient::Type: " << type; |
| + return nullptr; |
| } |
| void WebFrameWidgetImpl::applyViewportDeltas( |