| 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_IMPL_FOR_TEST_H_ | 5 #ifndef CC_TEST_PROXY_IMPL_FOR_TEST_H_ |
| 6 #define CC_TEST_PROXY_IMPL_FOR_TEST_H_ | 6 #define CC_TEST_PROXY_IMPL_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_impl.h" | 10 #include "cc/trees/proxy_impl.h" |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 // Creates a ProxyImpl that notifies the supplied |test_hooks| of various | 13 // Creates a ProxyImpl that notifies the supplied |test_hooks| of various |
| 14 // actions. | 14 // actions. |
| 15 class ProxyImplForTest : public ProxyImpl { | 15 class ProxyImplForTest : public ProxyImpl { |
| 16 public: | 16 public: |
| 17 static std::unique_ptr<ProxyImplForTest> Create( | 17 static std::unique_ptr<ProxyImplForTest> Create( |
| 18 TestHooks* test_hooks, | 18 TestHooks* test_hooks, |
| 19 ChannelImpl* channel_impl, | 19 ChannelImpl* channel_impl, |
| 20 LayerTreeHost* layer_tree_host, | 20 LayerTreeHost* layer_tree_host, |
| 21 TaskRunnerProvider* task_runner_provider, | 21 TaskRunnerProvider* task_runner_provider, |
| 22 std::unique_ptr<BeginFrameSource> external_begin_frame_source); | 22 std::unique_ptr<BeginFrameSource> external_begin_frame_source); |
| 23 | 23 |
| 24 using ProxyImpl::PostAnimationEventsToMainThreadOnImplThread; | 24 using ProxyImpl::PostAnimationEventsToMainThreadOnImplThread; |
| 25 using ProxyImpl::DidLoseOutputSurfaceOnImplThread; | 25 using ProxyImpl::DidLoseOutputSurfaceOnImplThread; |
| 26 using ProxyImpl::DidCompletePageScaleAnimationOnImplThread; | 26 using ProxyImpl::DidCompletePageScaleAnimationOnImplThread; |
| 27 using ProxyImpl::SendBeginMainFrameNotExpectedSoon; | 27 using ProxyImpl::SendBeginMainFrameNotExpectedSoon; |
| 28 | 28 |
| 29 bool HasCommitCompletionEvent() const; | |
| 30 bool GetNextCommitWaitsForActivation() const; | |
| 31 const DelayedUniqueNotifier& smoothness_priority_expiration_notifier() const { | 29 const DelayedUniqueNotifier& smoothness_priority_expiration_notifier() const { |
| 32 return smoothness_priority_expiration_notifier_; | 30 return smoothness_priority_expiration_notifier_; |
| 33 } | 31 } |
| 34 | 32 |
| 35 ProxyImplForTest( | 33 ProxyImplForTest( |
| 36 TestHooks* test_hooks, | 34 TestHooks* test_hooks, |
| 37 ChannelImpl* channel_impl, | 35 ChannelImpl* channel_impl, |
| 38 LayerTreeHost* layer_tree_host, | 36 LayerTreeHost* layer_tree_host, |
| 39 TaskRunnerProvider* task_runner_provider, | 37 TaskRunnerProvider* task_runner_provider, |
| 40 std::unique_ptr<BeginFrameSource> external_begin_frame_source); | 38 std::unique_ptr<BeginFrameSource> external_begin_frame_source); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 67 LayerTreeHost* layer_tree_host, | 65 LayerTreeHost* layer_tree_host, |
| 68 base::TimeTicks main_thread_start_time, | 66 base::TimeTicks main_thread_start_time, |
| 69 bool hold_commit_for_activation) override; | 67 bool hold_commit_for_activation) override; |
| 70 | 68 |
| 71 TestHooks* test_hooks_; | 69 TestHooks* test_hooks_; |
| 72 }; | 70 }; |
| 73 | 71 |
| 74 } // namespace cc | 72 } // namespace cc |
| 75 | 73 |
| 76 #endif // CC_TEST_PROXY_IMPL_FOR_TEST_H_ | 74 #endif // CC_TEST_PROXY_IMPL_FOR_TEST_H_ |
| OLD | NEW |