| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_TEST_PROXY_MAIN_FOR_TEST_H_ | |
| 6 #define CC_TEST_PROXY_MAIN_FOR_TEST_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "cc/test/test_hooks.h" | |
| 10 #include "cc/trees/proxy_main.h" | |
| 11 | |
| 12 namespace cc { | |
| 13 class ThreadedChannelForTest; | |
| 14 | |
| 15 // Creates a ProxyMain that notifies the supplied |test_hooks| of various | |
| 16 // actions. | |
| 17 class ProxyMainForTest : public ProxyMain { | |
| 18 public: | |
| 19 static std::unique_ptr<ProxyMainForTest> CreateThreaded( | |
| 20 TestHooks* test_hooks, | |
| 21 LayerTreeHost* host, | |
| 22 TaskRunnerProvider* task_runner_provider); | |
| 23 | |
| 24 static std::unique_ptr<ProxyMainForTest> CreateRemote( | |
| 25 TestHooks* test_hooks, | |
| 26 RemoteProtoChannel* remote_proto_channel, | |
| 27 LayerTreeHost* host, | |
| 28 TaskRunnerProvider* task_runner_provider); | |
| 29 | |
| 30 ~ProxyMainForTest() override; | |
| 31 | |
| 32 ProxyMainForTest(TestHooks* test_hooks, | |
| 33 LayerTreeHost* host, | |
| 34 TaskRunnerProvider* task_runner_provider); | |
| 35 | |
| 36 ThreadedChannelForTest* threaded_channel_for_test() const { | |
| 37 return threaded_channel_for_test_; | |
| 38 } | |
| 39 | |
| 40 void SetNeedsUpdateLayers() override; | |
| 41 void DidCompleteSwapBuffers() override; | |
| 42 void SetRendererCapabilities( | |
| 43 const RendererCapabilities& capabilities) override; | |
| 44 void BeginMainFrameNotExpectedSoon() override; | |
| 45 void DidCommitAndDrawFrame() override; | |
| 46 void SetAnimationEvents(std::unique_ptr<AnimationEvents> events) override; | |
| 47 void DidLoseOutputSurface() override; | |
| 48 void RequestNewOutputSurface() override; | |
| 49 void DidInitializeOutputSurface( | |
| 50 bool success, | |
| 51 const RendererCapabilities& capabilities) override; | |
| 52 void DidCompletePageScaleAnimation() override; | |
| 53 void BeginMainFrame(std::unique_ptr<BeginMainFrameAndCommitState> | |
| 54 begin_main_frame_state) override; | |
| 55 | |
| 56 TestHooks* test_hooks_; | |
| 57 ThreadedChannelForTest* threaded_channel_for_test_; | |
| 58 }; | |
| 59 | |
| 60 } // namespace cc | |
| 61 | |
| 62 #endif // CC_TEST_PROXY_MAIN_FOR_TEST_H_ | |
| OLD | NEW |