Chromium Code Reviews| 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/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 350 test_hooks_->DidReceiveCompositorFrameAck(); | 350 test_hooks_->DidReceiveCompositorFrameAck(); |
| 351 } | 351 } |
| 352 | 352 |
| 353 void DidSubmitCompositorFrame() override {} | 353 void DidSubmitCompositorFrame() override {} |
| 354 void DidLoseCompositorFrameSink() override {} | 354 void DidLoseCompositorFrameSink() override {} |
| 355 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } | 355 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } |
| 356 void DidCompletePageScaleAnimation() override {} | 356 void DidCompletePageScaleAnimation() override {} |
| 357 void BeginMainFrameNotExpectedSoon() override { | 357 void BeginMainFrameNotExpectedSoon() override { |
| 358 test_hooks_->BeginMainFrameNotExpectedSoon(); | 358 test_hooks_->BeginMainFrameNotExpectedSoon(); |
| 359 } | 359 } |
| 360 void BeginMainFrameNotExpectedUntil(base::TimeTicks frame_time) override {} | |
|
Sami
2017/03/30 15:30:37
s/frame_time/time/
Dan Elphick
2017/04/06 16:10:17
Done.
| |
| 360 | 361 |
| 361 private: | 362 private: |
| 362 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 363 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
| 363 : test_hooks_(test_hooks) {} | 364 : test_hooks_(test_hooks) {} |
| 364 | 365 |
| 365 TestHooks* test_hooks_; | 366 TestHooks* test_hooks_; |
| 366 }; | 367 }; |
| 367 | 368 |
| 368 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 369 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
| 369 class LayerTreeHostForTesting : public LayerTreeHost { | 370 class LayerTreeHostForTesting : public LayerTreeHost { |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 890 DCHECK(task_runner_provider()->IsMainThread() || | 891 DCHECK(task_runner_provider()->IsMainThread() || |
| 891 task_runner_provider()->IsMainThreadBlocked()); | 892 task_runner_provider()->IsMainThreadBlocked()); |
| 892 return layer_tree_host_.get(); | 893 return layer_tree_host_.get(); |
| 893 } | 894 } |
| 894 | 895 |
| 895 Proxy* LayerTreeTest::proxy() { | 896 Proxy* LayerTreeTest::proxy() { |
| 896 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; | 897 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; |
| 897 } | 898 } |
| 898 | 899 |
| 899 } // namespace cc | 900 } // namespace cc |
| OLD | NEW |