| 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 "cc/test/remote_channel_impl_for_test.h" | |
| 6 | |
| 7 #include "base/memory/ptr_util.h" | |
| 8 #include "cc/test/proxy_impl_for_test.h" | |
| 9 | |
| 10 namespace cc { | |
| 11 | |
| 12 std::unique_ptr<RemoteChannelImplForTest> RemoteChannelImplForTest::Create( | |
| 13 TestHooks* test_hooks, | |
| 14 LayerTreeHost* layer_tree_host, | |
| 15 RemoteProtoChannel* remote_proto_channel, | |
| 16 TaskRunnerProvider* task_runner_provider) { | |
| 17 return base::WrapUnique(new RemoteChannelImplForTest( | |
| 18 test_hooks, layer_tree_host, remote_proto_channel, task_runner_provider)); | |
| 19 } | |
| 20 | |
| 21 RemoteChannelImplForTest::RemoteChannelImplForTest( | |
| 22 TestHooks* test_hooks, | |
| 23 LayerTreeHost* layer_tree_host, | |
| 24 RemoteProtoChannel* remote_proto_channel, | |
| 25 TaskRunnerProvider* task_runner_provider) | |
| 26 : RemoteChannelImpl(layer_tree_host, | |
| 27 remote_proto_channel, | |
| 28 task_runner_provider), | |
| 29 test_hooks_(test_hooks), | |
| 30 proxy_impl_for_test_(nullptr) {} | |
| 31 | |
| 32 std::unique_ptr<ProxyImpl> RemoteChannelImplForTest::CreateProxyImpl( | |
| 33 ChannelImpl* channel_impl, | |
| 34 LayerTreeHost* layer_tree_host, | |
| 35 TaskRunnerProvider* task_runner_provider, | |
| 36 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { | |
| 37 std::unique_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create( | |
| 38 test_hooks_, channel_impl, layer_tree_host, task_runner_provider, | |
| 39 std::move(external_begin_frame_source)); | |
| 40 proxy_impl_for_test_ = proxy_impl.get(); | |
| 41 return std::move(proxy_impl); | |
| 42 } | |
| 43 | |
| 44 } // namespace cc | |
| OLD | NEW |