Index: ash/rotator/screen_rotation_animator.cc |
diff --git a/ash/rotator/screen_rotation_animator.cc b/ash/rotator/screen_rotation_animator.cc |
index ed37b7f1da31bb7d519193ea8c29d999fb91e8a8..3d32e87642ee12412c893fc628b911c42f735f7b 100644 |
--- a/ash/rotator/screen_rotation_animator.cc |
+++ b/ash/rotator/screen_rotation_animator.cc |
@@ -267,6 +267,13 @@ ScreenRotationAnimator::ScreenRotationAnimator(int64 display_id) |
ScreenRotationAnimator::~ScreenRotationAnimator() { |
} |
+bool ScreenRotationAnimator::CanAnimate() const { |
+ return Shell::GetInstance() |
+ ->display_manager() |
+ ->GetDisplayForId(display_id_) |
+ .is_valid(); |
+} |
+ |
void ScreenRotationAnimator::Rotate(gfx::Display::Rotation new_rotation) { |
const gfx::Display::Rotation current_rotation = |
GetCurrentRotation(display_id_); |