| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "web/CompositorProxyClientFactoryImpl.h" |
| 6 |
| 7 #include "core/dom/CompositorProxyClient.h" |
| 8 #include "web/AnimationWorkletProxyClientImpl.h" |
| 9 #include "web/CompositorMutatorImpl.h" |
| 10 #include "web/CompositorWorkerProxyClientImpl.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 CompositorProxyClientFactoryImpl::CompositorProxyClientFactoryImpl( |
| 15 CompositorMutatorImpl* mutator) |
| 16 : m_mutator(mutator) {} |
| 17 |
| 18 CompositorProxyClient* CompositorProxyClientFactoryImpl::create( |
| 19 CompositorProxyClient::Type type) { |
| 20 switch (type) { |
| 21 case CompositorProxyClient::kWorkerClient: |
| 22 return new CompositorWorkerProxyClientImpl(m_mutator); |
| 23 case CompositorProxyClient::kWorkletClient: |
| 24 return new AnimationWorkletProxyClientImpl(m_mutator); |
| 25 } |
| 26 |
| 27 NOTREACHED() << "Unexpected CompositorProxyClient::Type: " << type; |
| 28 return nullptr; |
| 29 } |
| 30 |
| 31 } // namespace blink |
| OLD | NEW |