Chromium Code Reviews| Index: ash/rotator/test/screen_rotation_animator_test_api.cc |
| diff --git a/ash/rotator/test/screen_rotation_animator_test_api.cc b/ash/rotator/test/screen_rotation_animator_test_api.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fb3dbe323e041476bdab56a978269fdd940de52f |
| --- /dev/null |
| +++ b/ash/rotator/test/screen_rotation_animator_test_api.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved. |
|
oshima
2017/03/16 20:13:10
remove "(c)"
same for the rest
wutao
2017/03/17 00:01:04
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ash/rotator/test/screen_rotation_animator_test_api.h" |
| + |
| +#include "ash/rotator/screen_rotation_animator.h" |
| +#include "ui/compositor/layer.h" |
| + |
| +namespace ash { |
| +namespace test { |
| + |
| +ScreenRotationAnimatorTestApi::ScreenRotationAnimatorTestApi( |
| + ScreenRotationAnimator* animator) |
| + : ui::test::MultiLayerAnimatorTestController(this), animator_(animator) {} |
| + |
| +ScreenRotationAnimatorTestApi::~ScreenRotationAnimatorTestApi() {} |
| + |
| +void ScreenRotationAnimatorTestApi::SetDisableAnimationTimers( |
| + bool disable_timers) { |
| + animator_->set_disable_animation_timers_for_test(disable_timers); |
| +} |
| + |
| +std::vector<ui::LayerAnimator*> |
| +ScreenRotationAnimatorTestApi::GetLayerAnimators() { |
| + std::vector<ui::LayerAnimator*> animators; |
| + if (animator_->old_layer_tree_owner_) { |
| + animators.insert(animators.end(), |
| + animator_->GetOldLayerTreeRootLayer()->GetAnimator()); |
| + } |
| + return animators; |
| +} |
| + |
| +} // namespace test |
| +} // namespace ash |