Index: ash/content/display/screen_orientation_controller_chromeos.cc |
diff --git a/ash/content/display/screen_orientation_controller_chromeos.cc b/ash/content/display/screen_orientation_controller_chromeos.cc |
index dbd44652a2e6b39e6463ddcf4ada549c79e477db..c64f3793b6561eab8d4b7ced21a7535011ba5307 100644 |
--- a/ash/content/display/screen_orientation_controller_chromeos.cc |
+++ b/ash/content/display/screen_orientation_controller_chromeos.cc |
@@ -116,11 +116,21 @@ void ScreenOrientationController::SetDisplayRotation( |
DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
if (!display_manager->HasInternalDisplay()) |
return; |
+ |
current_rotation_ = rotation; |
base::AutoReset<bool> auto_ignore_display_configuration_updates( |
&ignore_display_configuration_updates_, true); |
- ash::ScreenRotationAnimator(gfx::Display::InternalDisplayId()) |
- .Rotate(rotation); |
+ |
+ ash::ScreenRotationAnimator screen_rotation_animator( |
+ gfx::Display::InternalDisplayId()); |
+ if (screen_rotation_animator.CanAnimate()) { |
+ screen_rotation_animator.Rotate(rotation); |
+ } else { |
+ // TODO(bruthig): Fix the DisplayManager so that display rotations set on |
+ // inactive displays are persisted. See www.crbug.com/480703. |
+ Shell::GetInstance()->display_manager()->SetDisplayRotation( |
jonross
2015/04/24 14:18:08
Use the display manager from 116
bruthig
2015/04/24 16:17:12
display manager no longer exists.
jonross
2015/04/24 17:08:30
Acknowledged.
|
+ gfx::Display::InternalDisplayId(), rotation); |
+ } |
} |
void ScreenOrientationController::OnWindowActivated(aura::Window* gained_active, |