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