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

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed)

Created:
5 years, 8 months ago by jonross
Modified:
5 years, 8 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, extensions-reviews_chromium.org, michaelpg+watch-options_chromium.org, sadrul, jam, darin-cc_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_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

Refactor DisplayInfo::rotation_ to track different sources of rotations Currently DisplayInfo only tracks the active rotation for the given display. DisplayPreferences however saves a user rotation, as well as an accelerometer rotation. DisplayController::Observer::OnDisplayConfigurationChanged triggers the saving of display preferences. This has been leading to active accelerometer rotations being saved as user preferences, and being re-applied upon reboot. This change refactors DisplayInfo to track one rotation per source of rotation changes. DisplayPreferences has been updated to save based on these states. TEST=DisplayPreferencesTest.DontSaveMaximizeModeControllerRotations, also ran ash_unittests, and unit_tests BUG=chrome-os-partner:37555, 469752, 466861 Committed: https://crrev.com/d01de7f9b271d29dc1fe9126357a36c5563f0ff0 Cr-Commit-Position: refs/heads/master@{#326614}

Patch Set 1 : #

Total comments: 15

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Rebase #

Patch Set 4 : #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -212 lines) Patch
M ash/accelerators/accelerator_controller.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ash/content/display/screen_orientation_controller_chromeos.h View 1 2 chunks +7 lines, -3 lines 0 comments Download
M ash/content/display/screen_orientation_controller_chromeos.cc View 1 2 3 4 9 chunks +25 lines, -16 lines 0 comments Download
M ash/content/display/screen_orientation_controller_chromeos_unittest.cc View 1 2 22 chunks +51 lines, -64 lines 0 comments Download
M ash/display/display_controller.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M ash/display/display_controller_unittest.cc View 1 2 3 4 5 chunks +19 lines, -21 lines 0 comments Download
M ash/display/display_info.h View 1 2 3 4 chunks +13 lines, -4 lines 0 comments Download
M ash/display/display_info.cc View 1 2 3 7 chunks +23 lines, -7 lines 0 comments Download
M ash/display/display_info_unittest.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M ash/display/display_manager.h View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M ash/display/display_manager.cc View 1 2 3 4 3 chunks +9 lines, -5 lines 0 comments Download
M ash/display/root_window_transformers.cc View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
M ash/display/root_window_transformers_unittest.cc View 1 6 chunks +14 lines, -18 lines 0 comments Download
M ash/rotator/screen_rotation_animator.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M ash/rotator/screen_rotation_animator.cc View 1 2 3 7 chunks +10 lines, -8 lines 0 comments Download
M ash/system/audio/tray_audio.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ash/system/chromeos/tray_display.cc View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M ash/system/overview/overview_button_tray_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ash/test/ash_test_base.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M ash/test/ash_test_base.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M ash/wm/lock_layout_manager_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M ash/wm/maximize_mode/maximize_mode_controller_unittest.cc View 1 2 3 4 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/display/display_preferences.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/display/display_preferences_unittest.cc View 1 2 3 12 chunks +29 lines, -22 lines 0 comments Download
M chrome/browser/extensions/display_info_provider_chromeos.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/display_info_provider_chromeos_unittest.cc View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/options/chromeos/display_options_handler.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gfx/display.h View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (16 generated)
jonross
Hi Terry, This change is the first that is a part of the Display Rotation ...
5 years, 8 months ago (2015-04-10 17:54:44 UTC) #3
tdanderson
Hey Jon, I have some nits for you below, but otherwise LGTM. https://chromiumcodereview.appspot.com/1071353003/diff/20001/ash/display/display_info.cc File ash/display/display_info.cc ...
5 years, 8 months ago (2015-04-13 22:44:46 UTC) #4
jonross
https://codereview.chromium.org/1071353003/diff/20001/ash/display/display_info.cc File ash/display/display_info.cc (right): https://codereview.chromium.org/1071353003/diff/20001/ash/display/display_info.cc#newcode268 ash/display/display_info.cc:268: gfx::Display::Rotation DisplayInfo::Rotation( On 2015/04/13 22:44:46, tdanderson wrote: > Maybe ...
5 years, 8 months ago (2015-04-15 17:43:12 UTC) #6
jonross
oshima@chromium.org: Please review changes in ash/* chrome/browser/chromeos/display/ ui/gfx/display.h This change is the first stage in ...
5 years, 8 months ago (2015-04-15 17:45:22 UTC) #8
oshima
lgtm with nits https://codereview.chromium.org/1071353003/diff/60001/ash/display/display_info.h File ash/display/display_info.h (right): https://codereview.chromium.org/1071353003/diff/60001/ash/display/display_info.h#newcode146 ash/display/display_info.h:146: gfx::Display::Rotation ActiveRotation() const; GetActiveRotation() https://codereview.chromium.org/1071353003/diff/60001/ui/gfx/display.h File ...
5 years, 8 months ago (2015-04-17 17:52:44 UTC) #9
jonross
mukai@chromium.org: Please review changes in chrome/browser/ui/webui/options/chromeos/display_options_handler.cc I have updated it as a part of a ...
5 years, 8 months ago (2015-04-17 19:40:04 UTC) #11
jonross
asargent@chromium.org: Please review changes in chrome/browser/extensions/display_info_provider_chromeos* I have updated them as a part of a ...
5 years, 8 months ago (2015-04-17 19:41:50 UTC) #13
jonross
kalman@chromium.org: Please review changes in chrome/browser/extensions/display_info_provider_chromeos* I have updated them as a part of a ...
5 years, 8 months ago (2015-04-17 19:44:56 UTC) #16
Jun Mukai
c/b/ui/webui/options/chromeos/display_options_handler.cc lgtm.
5 years, 8 months ago (2015-04-17 19:51:19 UTC) #17
not at google - send to devlin
pkotwicz@ could you check the extensions change? I will lg after that.
5 years, 8 months ago (2015-04-17 19:53:26 UTC) #19
pkotwicz
Jon, is there a reason that this issue is closed?
5 years, 8 months ago (2015-04-17 20:33:28 UTC) #20
jonross
On 2015/04/17 20:33:28, pkotwicz wrote: > Jon, is there a reason that this issue is ...
5 years, 8 months ago (2015-04-17 20:41:09 UTC) #21
pkotwicz
kaman@ who are the users of chrome.system.display.setInfo(). It looks like the API was added here: ...
5 years, 8 months ago (2015-04-17 21:11:38 UTC) #22
pkotwicz
kalman@ who are the users of chrome.system.display.setInfo(). It looks like the API was added here: ...
5 years, 8 months ago (2015-04-17 21:12:13 UTC) #23
pkotwicz
Looks like the extension API name is actually chrome.system.display.setDisplayProperties()
5 years, 8 months ago (2015-04-17 21:13:01 UTC) #24
Jun Mukai
On 2015/04/17 21:13:01, pkotwicz wrote: > Looks like the extension API name is actually > ...
5 years, 8 months ago (2015-04-17 21:23:51 UTC) #26
jonross
On 2015/04/17 21:23:51, Jun Mukai wrote: > On 2015/04/17 21:13:01, pkotwicz wrote: > > Looks ...
5 years, 8 months ago (2015-04-17 21:27:48 UTC) #27
jonross
hshi@ Would you be able to review the changes to: chrome/browser/extensions/display_info_provider_chromeos.cc chrome/browser/extensions/display_info_provider_chromeos_unittest.cc Thanks, Jon
5 years, 8 months ago (2015-04-20 14:21:39 UTC) #28
hshi1
On 2015/04/20 14:21:39, jonross wrote: > hshi@ > > Would you be able to review ...
5 years, 8 months ago (2015-04-20 15:23:17 UTC) #29
pkotwicz
hshi@ For the sake of interest, in which cases is the API chrome.system.display.setDisplayProperties() used?
5 years, 8 months ago (2015-04-20 15:31:56 UTC) #30
hshi1
On 2015/04/20 15:31:56, pkotwicz wrote: > hshi@ For the sake of interest, in which cases ...
5 years, 8 months ago (2015-04-20 16:26:30 UTC) #31
pkotwicz
tbarzic@, do you know in which cases the API chrome.system.display.setDisplayProperties() is used?
5 years, 8 months ago (2015-04-20 17:21:28 UTC) #33
tbarzic
On 2015/04/20 17:21:28, pkotwicz wrote: > tbarzic@, do you know in which cases the API ...
5 years, 8 months ago (2015-04-20 17:31:57 UTC) #34
jonross
pkotwicz@ & kalman@ Any concerns regarding the extensions changes?
5 years, 8 months ago (2015-04-21 13:33:59 UTC) #35
jonross
tbarzic@ in the code review that landed the change: https://chromiumcodereview.appspot.com/16817006 it mentions manual testing on ...
5 years, 8 months ago (2015-04-21 14:56:54 UTC) #36
tbarzic
On 2015/04/21 14:56:54, jonross wrote: > tbarzic@ in the code review that landed the change: ...
5 years, 8 months ago (2015-04-21 18:07:27 UTC) #37
jonross
On 2015/04/21 18:07:27, tbarzic wrote: > On 2015/04/21 14:56:54, jonross wrote: > > tbarzic@ in ...
5 years, 8 months ago (2015-04-21 21:02:38 UTC) #38
pkotwicz
chrome/browser/extensions LGTM Thanks a lot for doing the digging Jon!
5 years, 8 months ago (2015-04-22 01:01:29 UTC) #39
jonross
On 2015/04/22 01:01:29, pkotwicz wrote: > chrome/browser/extensions LGTM > > Thanks a lot for doing ...
5 years, 8 months ago (2015-04-22 21:27:19 UTC) #40
not at google - send to devlin
lgtm
5 years, 8 months ago (2015-04-22 21:34:17 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1071353003/100001
5 years, 8 months ago (2015-04-22 21:40:10 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/76376) win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, ...
5 years, 8 months ago (2015-04-22 23:03:11 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1071353003/120001
5 years, 8 months ago (2015-04-23 18:12:31 UTC) #49
commit-bot: I haz the power
Committed patchset #5 (id:120001)
5 years, 8 months ago (2015-04-23 19:52:20 UTC) #50
commit-bot: I haz the power
5 years, 8 months ago (2015-04-23 19:53:21 UTC) #51
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d01de7f9b271d29dc1fe9126357a36c5563f0ff0
Cr-Commit-Position: refs/heads/master@{#326614}

Powered by Google App Engine
This is Rietveld 408576698