| 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); | |
| 23 | 22 |
| 24 ~ProxyMainForTest() override; | 23 ~ProxyMainForTest() override; |
| 25 | 24 |
| 26 ProxyMainForTest(TestHooks* test_hooks, | 25 ProxyMainForTest(TestHooks* test_hooks, |
| 27 LayerTreeHost* host, | 26 LayerTreeHost* host, |
| 28 TaskRunnerProvider* task_runner_provider, | 27 TaskRunnerProvider* task_runner_provider); |
| 29 scoped_ptr<BeginFrameSource> external_begin_frame_source); | |
| 30 | 28 |
| 31 void SetNeedsUpdateLayers() override; | 29 void SetNeedsUpdateLayers() override; |
| 32 void DidCompleteSwapBuffers() override; | 30 void DidCompleteSwapBuffers() override; |
| 33 void SetRendererCapabilities( | 31 void SetRendererCapabilities( |
| 34 const RendererCapabilities& capabilities) override; | 32 const RendererCapabilities& capabilities) override; |
| 35 void BeginMainFrameNotExpectedSoon() override; | 33 void BeginMainFrameNotExpectedSoon() override; |
| 36 void DidCommitAndDrawFrame() override; | 34 void DidCommitAndDrawFrame() override; |
| 37 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events) override; | 35 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events) override; |
| 38 void DidLoseOutputSurface() override; | 36 void DidLoseOutputSurface() override; |
| 39 void RequestNewOutputSurface() override; | 37 void RequestNewOutputSurface() override; |
| 40 void DidInitializeOutputSurface( | 38 void DidInitializeOutputSurface( |
| 41 bool success, | 39 bool success, |
| 42 const RendererCapabilities& capabilities) override; | 40 const RendererCapabilities& capabilities) override; |
| 43 void DidCompletePageScaleAnimation() override; | 41 void DidCompletePageScaleAnimation() override; |
| 44 void PostFrameTimingEventsOnMain( | 42 void PostFrameTimingEventsOnMain( |
| 45 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 43 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 46 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) | 44 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) |
| 47 override; | 45 override; |
| 48 void BeginMainFrame( | 46 void BeginMainFrame( |
| 49 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override; | 47 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override; |
| 50 | 48 |
| 51 TestHooks* test_hooks_; | 49 TestHooks* test_hooks_; |
| 52 }; | 50 }; |
| 53 | 51 |
| 54 } // namespace cc | 52 } // namespace cc |
| 55 | 53 |
| 56 #endif // CC_TEST_PROXY_MAIN_FOR_TEST_H_ | 54 #endif // CC_TEST_PROXY_MAIN_FOR_TEST_H_ |
| OLD | NEW |