Entering Docked Mode (external display attached, lid shut) causes incorrect display...
commitb685602a8ab8406132e436231527485d847b5413
authorjonross <jonross@chromium.org>
Tue, 2 Jun 2015 15:29:53 +0000 (2 08:29 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 2 Jun 2015 15:30:20 +0000 (2 15:30 +0000)
tree4a8e3781b61edcdb014c5e4cf7ab93a81e029449
parent6334e44cb55aa0129b1bbb54a04aca15e18905b7
Entering Docked Mode (external display attached, lid shut) causes incorrect display rotations to persist when the internal display is reactivated.

Two current situations lead to this.
  1) Docked mode recreates large portions of ash::Shell, so classes reacting to lid closures never execute this logic. As far as they know the lid is open. They then try to apply changes to an inactive display. They are never told to reapply them.
  2) The internal display is deactivated, however it's active rotation is never reset. Upon reactivating the window the invalid active rotation is re-applied.

This change has DisplayManager reset the active rotation of the internal display upon its deactivation.

Additionally rotations applied to an inactive display are set on the display info so that they can be applied when the window is reactivated.

TEST=DisplayManagerTest.Rotate
BUG=chrome-os-partner:38778, 480703

Review URL: https://codereview.chromium.org/1162603008

Cr-Commit-Position: refs/heads/master@{#332392}
ash/content/display/screen_orientation_controller_chromeos.cc
ash/display/display_manager.cc
ash/display/display_manager.h
ash/display/display_manager_unittest.cc