Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Issue 759063002: Move Screen Rotation from MaximizeModeController to ScreenOrientationController (Closed)

Created:
6 years ago by jonross
Modified:
5 years, 11 months ago
Reviewers:
flackr, Ian Vollick, oshima
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, jam, darin-cc_chromium.org, oshima+watch_chromium.org, kalyank, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This change renames ScreenOrientationDelegate to ScreenOrientationController to reflect on the new responsibilities that it is assuming. The tracking of the accelerometer screen rotation, as well as the rotation lock, has been moved from MaximizeModeController to ScreenOrientationController. ScreenOrientationController is now responsible for all rotation lock requests, from both TouchView user interface controls, as well as the Screen Orientation JavaScript API. ScreenOrientationController is Chrome OS only. Classes using the rotation lock API have been updated to only do so on Chrome OS. Screen rotation tests have been moved from MaximizeModeControllerTest to ScreenOrientationControllerTest. Other unittests have been updated to reflect the Chrome OS change. All pre-existing tests for rotation behaviour have been ran. Manual testing of both TouchView and Screen Orientation API have been done. TEST=ScreenOrientationControllerTest, TrayRotationLockTest, MaximizeModeControllerTest, DisplayPreferencesTest BUG=396760 Committed: https://crrev.com/0af4521339c7ca15535ea92dd4c27f94610b9a67 Cr-Commit-Position: refs/heads/master@{#311299}

Patch Set 1 : #

Total comments: 14

Patch Set 2 : Merge in Maximize Mode changes #

Patch Set 3 : Refactor Rotation from MaximizeModeController to ScreenOrientationController #

Total comments: 9

Patch Set 4 : Add AccelerationUpdate helper #

Patch Set 5 : Change similarity to account for moved files #

Total comments: 12

Patch Set 6 : Rebase #

Patch Set 7 : Rebase #

Patch Set 8 : Fix tests post rebase #

Patch Set 9 : Update Helper code #

Total comments: 10

Patch Set 10 : #

Patch Set 11 : Vector Unittests #

Patch Set 12 : Test inverses #

Patch Set 13 : Rebase #

Patch Set 14 : Fix Linux Compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+751 lines, -1034 lines) Patch
M ash/ash.gyp View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -4 lines 0 comments Download
A + ash/content/display/screen_orientation_controller_chromeos.h View 1 2 3 4 5 6 7 8 9 5 chunks +88 lines, -7 lines 0 comments Download
A + ash/content/display/screen_orientation_controller_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +195 lines, -33 lines 0 comments Download
A + ash/content/display/screen_orientation_controller_chromeos_unittest.cc View 1 2 3 4 5 6 7 8 9 12 chunks +237 lines, -23 lines 0 comments Download
M ash/content/display/screen_orientation_delegate_chromeos.h View 1 2 1 chunk +0 lines, -64 lines 0 comments Download
M ash/content/display/screen_orientation_delegate_chromeos_unittest.cc View 1 2 1 chunk +0 lines, -194 lines 0 comments Download
M ash/shell.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -5 lines 0 comments Download
M ash/shell.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +9 lines, -6 lines 0 comments Download
M ash/system/chromeos/rotation/tray_rotation_lock.h View 1 2 2 chunks +12 lines, -11 lines 0 comments Download
M ash/system/chromeos/rotation/tray_rotation_lock.cc View 1 2 6 chunks +21 lines, -16 lines 0 comments Download
M ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc View 1 2 5 chunks +13 lines, -10 lines 0 comments Download
M ash/system/chromeos/tray_display.cc View 1 2 3 4 5 6 5 chunks +10 lines, -7 lines 0 comments Download
M ash/wm/maximize_mode/maximize_mode_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +9 lines, -88 lines 0 comments Download
M ash/wm/maximize_mode/maximize_mode_controller.cc View 1 2 3 4 5 6 7 8 9 chunks +20 lines, -232 lines 0 comments Download
M ash/wm/maximize_mode/maximize_mode_controller_unittest.cc View 1 2 3 4 5 6 7 3 chunks +1 line, -283 lines 0 comments Download
M chrome/browser/chromeos/display/display_preferences_unittest.cc View 1 2 3 4 5 6 11 chunks +20 lines, -51 lines 0 comments Download
M chromeos/accelerometer/accelerometer_reader.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M chromeos/accelerometer/accelerometer_reader.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -0 lines 0 comments Download
M ui/gfx/geometry/vector3d_f.h View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
M ui/gfx/geometry/vector3d_f.cc View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -0 lines 0 comments Download
M ui/gfx/geometry/vector3d_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +53 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (9 generated)
jonross
Hi Rob, Could you review this change? I refactor rotation lock out of MaximizeModeController and ...
6 years ago (2014-11-25 22:40:22 UTC) #3
flackr
https://codereview.chromium.org/759063002/diff/20001/ash/content/display/screen_orientation_delegate_chromeos.cc File ash/content/display/screen_orientation_delegate_chromeos.cc (right): https://codereview.chromium.org/759063002/diff/20001/ash/content/display/screen_orientation_delegate_chromeos.cc#newcode11 ash/content/display/screen_orientation_delegate_chromeos.cc:11: #include "ash/wm/maximize_mode/maximize_mode_controller.h" Obsolete? https://codereview.chromium.org/759063002/diff/20001/ash/content/display/screen_orientation_delegate_chromeos.cc#newcode74 ash/content/display/screen_orientation_delegate_chromeos.cc:74: base::AutoReset<bool> auto_ignore_display_configuration_updates( Can you ...
6 years ago (2014-11-27 15:39:16 UTC) #4
jonross
ScreenOrientationDelegate has been renamed ScreenOrientationController to reflect how it will be responsible for screen orientation ...
6 years ago (2014-12-10 17:57:30 UTC) #5
jonross
Hi Oshima, I have refactored MaximizeModeController, removing the parts that track accelerometer based screen rotation. ...
6 years ago (2014-12-11 16:49:27 UTC) #7
oshima
https://codereview.chromium.org/759063002/diff/60001/ash/content/display/screen_orientation_controller_chromeos.h File ash/content/display/screen_orientation_controller_chromeos.h (right): https://codereview.chromium.org/759063002/diff/60001/ash/content/display/screen_orientation_controller_chromeos.h#newcode59 ash/content/display/screen_orientation_controller_chromeos.h:59: bool rotation_locked() { return rotation_locked_; } nit: const https://codereview.chromium.org/759063002/diff/60001/ash/wm/maximize_mode/maximize_mode_controller.cc ...
6 years ago (2014-12-11 23:51:28 UTC) #8
flackr
Can you try git cl upload with a lower similarity so that the moves show ...
6 years ago (2014-12-12 16:19:17 UTC) #9
jonross
I have also uploaded the latest patch with a lower similarity to show the moved ...
6 years ago (2014-12-12 18:30:05 UTC) #10
oshima
https://codereview.chromium.org/759063002/diff/60001/ash/wm/maximize_mode/maximize_mode_controller.cc File ash/wm/maximize_mode/maximize_mode_controller.cc (left): https://codereview.chromium.org/759063002/diff/60001/ash/wm/maximize_mode/maximize_mode_controller.cc#oldcode202 ash/wm/maximize_mode/maximize_mode_controller.cc:202: LeaveMaximizeMode(); On 2014/12/12 18:30:04, jonross wrote: > On 2014/12/11 ...
6 years ago (2014-12-12 19:59:54 UTC) #11
flackr
https://codereview.chromium.org/759063002/diff/100001/ash/ash.gyp File ash/ash.gyp (right): https://codereview.chromium.org/759063002/diff/100001/ash/ash.gyp#newcode969 ash/ash.gyp:969: 'content/display/screen_orientation_controller_chromeos.h', We have to explicitly exclude these files? Shouldn't ...
6 years ago (2014-12-12 20:46:06 UTC) #12
jonross
https://codereview.chromium.org/759063002/diff/100001/ash/ash.gyp File ash/ash.gyp (right): https://codereview.chromium.org/759063002/diff/100001/ash/ash.gyp#newcode969 ash/ash.gyp:969: 'content/display/screen_orientation_controller_chromeos.h', On 2014/12/12 20:46:06, flackr wrote: > We have ...
5 years, 11 months ago (2015-01-06 19:56:10 UTC) #13
oshima
lgtm with nits. By the way, what'd happen if I entered to docked mode while ...
5 years, 11 months ago (2015-01-09 21:23:56 UTC) #14
oshima
On 2015/01/09 21:23:56, oshima wrote: > lgtm with nits. > > By the way, what'd ...
5 years, 11 months ago (2015-01-09 21:28:40 UTC) #15
jonross
https://codereview.chromium.org/759063002/diff/180001/ash/content/display/screen_orientation_controller_chromeos.cc File ash/content/display/screen_orientation_controller_chromeos.cc (right): https://codereview.chromium.org/759063002/diff/180001/ash/content/display/screen_orientation_controller_chromeos.cc#newcode128 ash/content/display/screen_orientation_controller_chromeos.cc:128: HandleScreenRotation(update.get(ui::ACCELEROMETER_SOURCE_SCREEN)); On 2015/01/09 21:23:55, oshima wrote: > optional: or ...
5 years, 11 months ago (2015-01-12 14:46:49 UTC) #16
jonross
vollick@chromium.org: Please review changes in ui/fx/geometry/vector3d_f.h/cc I've added a helper method for determining the angular ...
5 years, 11 months ago (2015-01-12 14:48:42 UTC) #18
jonross
vollick@chromium.org: Please review changes in ui/fx/geometry/vector3d_f.h/cc I've added a helper method for determining the angular ...
5 years, 11 months ago (2015-01-12 14:48:43 UTC) #19
jonross
vollick@chromium.org: Please review changes in ui/fx/geometry/vector3d_f.h/cc I've added a helper method for determining the angular ...
5 years, 11 months ago (2015-01-12 14:48:45 UTC) #20
Ian Vollick
On 2015/01/12 14:48:45, jonross wrote: > mailto:vollick@chromium.org: Please review changes in > > ui/fx/geometry/vector3d_f.h/cc > ...
5 years, 11 months ago (2015-01-12 15:34:57 UTC) #21
jonross
On 2015/01/12 15:34:57, vollick wrote: > On 2015/01/12 14:48:45, jonross wrote: > > mailto:vollick@chromium.org: Please ...
5 years, 11 months ago (2015-01-12 17:59:06 UTC) #22
jonross
On 2015/01/12 17:59:06, jonross wrote: > On 2015/01/12 15:34:57, vollick wrote: > > On 2015/01/12 ...
5 years, 11 months ago (2015-01-12 19:21:23 UTC) #23
Ian Vollick
On 2015/01/12 19:21:23, jonross wrote: > On 2015/01/12 17:59:06, jonross wrote: > > On 2015/01/12 ...
5 years, 11 months ago (2015-01-12 19:28:39 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759063002/240001
5 years, 11 months ago (2015-01-12 19:30:21 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/48791) android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/36816) chromium_presubmit ...
5 years, 11 months ago (2015-01-12 19:35:22 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759063002/260001
5 years, 11 months ago (2015-01-13 14:50:14 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/49333)
5 years, 11 months ago (2015-01-13 15:04:37 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759063002/280001
5 years, 11 months ago (2015-01-13 17:56:01 UTC) #34
commit-bot: I haz the power
Committed patchset #14 (id:280001)
5 years, 11 months ago (2015-01-13 18:56:18 UTC) #35
commit-bot: I haz the power
5 years, 11 months ago (2015-01-13 18:57:14 UTC) #36
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/0af4521339c7ca15535ea92dd4c27f94610b9a67
Cr-Commit-Position: refs/heads/master@{#311299}

Powered by Google App Engine
This is Rietveld 408576698