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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 360 |
| 361 bool IsForSubframe() override { return false; } |
| 362 |
361 private: | 363 private: |
362 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) | 364 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) |
363 : test_hooks_(test_hooks) {} | 365 : test_hooks_(test_hooks) {} |
364 | 366 |
365 TestHooks* test_hooks_; | 367 TestHooks* test_hooks_; |
366 }; | 368 }; |
367 | 369 |
368 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. | 370 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. |
369 class LayerTreeHostForTesting : public LayerTreeHost { | 371 class LayerTreeHostForTesting : public LayerTreeHost { |
370 public: | 372 public: |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 DCHECK(task_runner_provider()->IsMainThread() || | 893 DCHECK(task_runner_provider()->IsMainThread() || |
892 task_runner_provider()->IsMainThreadBlocked()); | 894 task_runner_provider()->IsMainThreadBlocked()); |
893 return layer_tree_host_.get(); | 895 return layer_tree_host_.get(); |
894 } | 896 } |
895 | 897 |
896 Proxy* LayerTreeTest::proxy() { | 898 Proxy* LayerTreeTest::proxy() { |
897 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; | 899 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; |
898 } | 900 } |
899 | 901 |
900 } // namespace cc | 902 } // namespace cc |
OLD | NEW |