OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PROXY_MAIN_FOR_TEST_H_ | 5 #ifndef CC_TEST_PROXY_MAIN_FOR_TEST_H_ |
6 #define CC_TEST_PROXY_MAIN_FOR_TEST_H_ | 6 #define CC_TEST_PROXY_MAIN_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/proxy_main.h" | 10 #include "cc/trees/proxy_main.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 // Creates a ProxyMain that notifies the supplied |test_hooks| of various | 14 // Creates a ProxyMain that notifies the supplied |test_hooks| of various |
15 // actions. | 15 // actions. |
16 class ProxyMainForTest : public ProxyMain { | 16 class ProxyMainForTest : public ProxyMain { |
17 public: | 17 public: |
18 static scoped_ptr<ProxyMain> CreateThreaded( | 18 static scoped_ptr<ProxyMain> CreateThreaded( |
19 TestHooks* test_hooks, | 19 TestHooks* test_hooks, |
20 LayerTreeHost* host, | 20 LayerTreeHost* host, |
21 TaskRunnerProvider* task_runner_provider, | 21 TaskRunnerProvider* task_runner_provider, |
22 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 22 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
23 | 23 |
| 24 static scoped_ptr<ProxyMain> CreateRemote( |
| 25 TestHooks* test_hooks, |
| 26 RemoteProtoChannel* remote_proto_channel, |
| 27 LayerTreeHost* host, |
| 28 TaskRunnerProvider* task_runner_provider); |
| 29 |
24 ~ProxyMainForTest() override; | 30 ~ProxyMainForTest() override; |
25 | 31 |
26 ProxyMainForTest(TestHooks* test_hooks, | 32 ProxyMainForTest(TestHooks* test_hooks, |
27 LayerTreeHost* host, | 33 LayerTreeHost* host, |
28 TaskRunnerProvider* task_runner_provider, | 34 TaskRunnerProvider* task_runner_provider, |
29 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 35 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
30 | 36 |
31 void SetNeedsUpdateLayers() override; | 37 void SetNeedsUpdateLayers() override; |
32 void DidCompleteSwapBuffers() override; | 38 void DidCompleteSwapBuffers() override; |
33 void SetRendererCapabilities( | 39 void SetRendererCapabilities( |
(...skipping 13 matching lines...) Expand all Loading... |
47 override; | 53 override; |
48 void BeginMainFrame( | 54 void BeginMainFrame( |
49 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override; | 55 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override; |
50 | 56 |
51 TestHooks* test_hooks_; | 57 TestHooks* test_hooks_; |
52 }; | 58 }; |
53 | 59 |
54 } // namespace cc | 60 } // namespace cc |
55 | 61 |
56 #endif // CC_TEST_PROXY_MAIN_FOR_TEST_H_ | 62 #endif // CC_TEST_PROXY_MAIN_FOR_TEST_H_ |
OLD | NEW |