Screen Orientation Controller allow rotation for some orientations
commit2d2c2fd60737e4f3b4dcd7182f6c67d8c8f60d2b
authorjonross <jonross@chromium.org>
Mon, 2 Feb 2015 20:58:23 +0000 (2 12:58 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 2 Feb 2015 20:59:22 +0000 (2 20:59 +0000)
tree69885fb958847a49532ef5389732650789dae92c
parentbe66ae8726e1cc4f24cbab90095a107b790d1ea6
Screen Orientation Controller allow rotation for some orientations

Some orientation locks allow rotation between the two angles of the given orientation. For landscape 0/180, for portrait 90/270.

Update ScreenOrientationController to check the orientaiton of a rotation lock. If the orientation supports rotation, allow accelerometer events to change the rotation.

TEST=ScreenOrientationControllerTest.LandscapeOrientationAllowsRotation, ScreenOrientationControllerTest.PortraitOrientationAllowsRotation, ScreenOrientationControllerTest.OrientationLockDisallowsRotation, ScreenOrientationControllerTest.UserRotationLockDisallowsRotation
BUG=396760

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

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