| 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..0c26e474efb6c8aefc78548e1b730d7a91a62036
|
| --- /dev/null
|
| +++ b/ash/rotator/test/screen_rotation_animator_test_api.cc
|
| @@ -0,0 +1,35 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// 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"
|
| +#include "ui/compositor/layer_tree_owner.h"
|
| +
|
| +namespace ash {
|
| +namespace test {
|
| +
|
| +ScreenRotationAnimatorTestApi::ScreenRotationAnimatorTestApi(
|
| + ScreenRotationAnimator* animator)
|
| + : ui::test::MultiLayerAnimatorTestController(this), animator_(animator) {}
|
| +
|
| +ScreenRotationAnimatorTestApi::~ScreenRotationAnimatorTestApi() {}
|
| +
|
| +void ScreenRotationAnimatorTestApi::DisableAnimationTimers() {
|
| + animator_->set_disable_animation_timers_for_test(true);
|
| +}
|
| +
|
| +std::vector<ui::LayerAnimator*>
|
| +ScreenRotationAnimatorTestApi::GetLayerAnimators() {
|
| + std::vector<ui::LayerAnimator*> animators;
|
| + if (animator_->old_layer_tree_owner_) {
|
| + animators.insert(animators.end(),
|
| + animator_->old_layer_tree_owner_->root()->GetAnimator());
|
| + }
|
| + return animators;
|
| +}
|
| +
|
| +} // namespace test
|
| +} // namespace ash
|
|
|