Index: ash/rotator/screen_rotation_animator.cc |
diff --git a/ash/rotator/screen_rotation_animator.cc b/ash/rotator/screen_rotation_animator.cc |
index 8517759d6975210185e5bbd83bad9695e7babfcb..9b746b6821a04ea20bab0f03aca94f018b063812 100644 |
--- a/ash/rotator/screen_rotation_animator.cc |
+++ b/ash/rotator/screen_rotation_animator.cc |
@@ -279,6 +279,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, |
gfx::Display::RotationSource source) { |
const gfx::Display::Rotation current_rotation = |