Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2482)

Unified Diff: ash/rotator/test/screen_rotation_animator_test_api.cc

Issue 2728803002: Handles users rotating screen too early (Closed)
Patch Set: Rebased to commit. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/rotator/test/screen_rotation_animator_test_api.h ('k') | ash/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/rotator/test/screen_rotation_animator_test_api.h ('k') | ash/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698