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

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

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 #ifndef CC_TEST_THREADED_CHANNEL_FOR_TEST_H_ 5 #ifndef CC_TEST_THREADED_CHANNEL_FOR_TEST_H_
6 #define CC_TEST_THREADED_CHANNEL_FOR_TEST_H_ 6 #define CC_TEST_THREADED_CHANNEL_FOR_TEST_H_
7 7
8 #include "base/macros.h"
9 #include "cc/test/test_hooks.h"
10 #include "cc/trees/threaded_channel.h" 8 #include "cc/trees/threaded_channel.h"
11 9
12 namespace cc { 10 namespace cc {
13 class ProxyImplForTest;
14 11
15 // ThreadedChannel that notifies |test_hooks| of internal actions by ProxyImpl.
16 class ThreadedChannelForTest : public ThreadedChannel { 12 class ThreadedChannelForTest : public ThreadedChannel {
17 public: 13 public:
18 static std::unique_ptr<ThreadedChannelForTest> Create( 14 ThreadedChannelForTest(ProxyMain* proxy_main,
19 TestHooks* test_hooks,
20 ProxyMain* proxy_main,
21 TaskRunnerProvider* task_runner_provider);
22
23 ProxyImplForTest* proxy_impl_for_test() { return proxy_impl_for_test_; }
24
25 private:
26 ThreadedChannelForTest(TestHooks* test_hooks,
27 ProxyMain* proxy_main,
28 TaskRunnerProvider* task_runner_provider); 15 TaskRunnerProvider* task_runner_provider);
29 16
17 ProxyImpl* proxy_impl() { return proxy_impl_; }
18
19 protected:
20 // ThreadedChannel overrides.
30 std::unique_ptr<ProxyImpl> CreateProxyImpl( 21 std::unique_ptr<ProxyImpl> CreateProxyImpl(
31 ChannelImpl* channel_impl, 22 ChannelImpl* channel_impl,
32 LayerTreeHost* layer_tree_host, 23 LayerTreeHost* layer_tree_host,
33 TaskRunnerProvider* task_runner_provider, 24 TaskRunnerProvider* task_runner_provider,
34 std::unique_ptr<BeginFrameSource> external_begin_frame_source) override; 25 std::unique_ptr<BeginFrameSource> external_begin_frame_source) override;
35 26
36 TestHooks* test_hooks_; 27 private:
37 ProxyImplForTest* proxy_impl_for_test_; 28 ProxyImpl* proxy_impl_ = nullptr;
38 }; 29 };
39 30
40 } // namespace cc 31 } // namespace cc
41 32
42 #endif // CC_TEST_THREADED_CHANNEL_FOR_TEST_H_ 33 #endif // CC_TEST_THREADED_CHANNEL_FOR_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698