| 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 #include "cc/test/layer_tree_test.h" | 5 #include "cc/test/layer_tree_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 void DidCompleteSwapBuffers() override { | 387 void DidCompleteSwapBuffers() override { |
| 388 test_hooks_->DidCompleteSwapBuffers(); | 388 test_hooks_->DidCompleteSwapBuffers(); |
| 389 } | 389 } |
| 390 | 390 |
| 391 void DidPostSwapBuffers() override {} | 391 void DidPostSwapBuffers() override {} |
| 392 void DidAbortSwapBuffers() override {} | 392 void DidAbortSwapBuffers() override {} |
| 393 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } | 393 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } |
| 394 void DidCompletePageScaleAnimation() override {} | 394 void DidCompletePageScaleAnimation() override {} |
| 395 void BeginMainFrameNotExpectedSoon() override {} | 395 void BeginMainFrameNotExpectedSoon() override {} |
| 396 | 396 |
| 397 void RecordFrameTimingEvents( | |
| 398 std::unique_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | |
| 399 std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) | |
| 400 override {} | |
| 401 | |
| 402 private: | 397 private: |
| 403 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 398 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
| 404 : test_hooks_(test_hooks) {} | 399 : test_hooks_(test_hooks) {} |
| 405 | 400 |
| 406 TestHooks* test_hooks_; | 401 TestHooks* test_hooks_; |
| 407 }; | 402 }; |
| 408 | 403 |
| 409 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 404 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
| 410 class LayerTreeHostForTesting : public LayerTreeHost { | 405 class LayerTreeHostForTesting : public LayerTreeHost { |
| 411 public: | 406 public: |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 | 1028 |
| 1034 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { | 1029 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { |
| 1035 DCHECK(IsRemoteTest()); | 1030 DCHECK(IsRemoteTest()); |
| 1036 DCHECK(remote_client_layer_tree_host_); | 1031 DCHECK(remote_client_layer_tree_host_); |
| 1037 | 1032 |
| 1038 return static_cast<RemoteChannelImplForTest*>( | 1033 return static_cast<RemoteChannelImplForTest*>( |
| 1039 remote_client_layer_tree_host_->proxy()); | 1034 remote_client_layer_tree_host_->proxy()); |
| 1040 } | 1035 } |
| 1041 | 1036 |
| 1042 } // namespace cc | 1037 } // namespace cc |
| OLD | NEW |