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

Side by Side Diff: cc/test/threaded_channel_for_test.cc

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: rebase Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/threaded_channel_for_test.h" 5 #include "cc/test/threaded_channel_for_test.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/test/proxy_impl_for_test.h" 8 #include "cc/trees/proxy_impl.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 std::unique_ptr<ThreadedChannelForTest> ThreadedChannelForTest::Create(
13 TestHooks* test_hooks,
14 ProxyMain* proxy_main,
15 TaskRunnerProvider* task_runner_provider) {
16 return base::WrapUnique(
17 new ThreadedChannelForTest(test_hooks, proxy_main, task_runner_provider));
18 }
19
20 ThreadedChannelForTest::ThreadedChannelForTest( 12 ThreadedChannelForTest::ThreadedChannelForTest(
21 TestHooks* test_hooks,
22 ProxyMain* proxy_main, 13 ProxyMain* proxy_main,
23 TaskRunnerProvider* task_runner_provider) 14 TaskRunnerProvider* task_runner_provider)
24 : ThreadedChannel(proxy_main, task_runner_provider), 15 : ThreadedChannel(proxy_main, task_runner_provider) {}
25 test_hooks_(test_hooks),
26 proxy_impl_for_test_(nullptr) {}
27 16
28 std::unique_ptr<ProxyImpl> ThreadedChannelForTest::CreateProxyImpl( 17 std::unique_ptr<ProxyImpl> ThreadedChannelForTest::CreateProxyImpl(
29 ChannelImpl* channel_impl, 18 ChannelImpl* channel_impl,
30 LayerTreeHost* layer_tree_host, 19 LayerTreeHost* layer_tree_host,
31 TaskRunnerProvider* task_runner_provider, 20 TaskRunnerProvider* task_runner_provider,
32 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { 21 std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
33 std::unique_ptr<ProxyImplForTest> proxy_impl = ProxyImplForTest::Create( 22 std::unique_ptr<ProxyImpl> proxy_impl = base::MakeUnique<ProxyImpl>(
34 test_hooks_, channel_impl, layer_tree_host, task_runner_provider, 23 channel_impl, layer_tree_host, task_runner_provider,
35 std::move(external_begin_frame_source)); 24 std::move(external_begin_frame_source));
36 proxy_impl_for_test_ = proxy_impl.get(); 25 proxy_impl_ = proxy_impl.get();
37 return std::move(proxy_impl); 26 return proxy_impl;
38 } 27 }
39 28
40 } // namespace cc 29 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698