|
|
Chromium Code Reviews
DescriptionMake RotationLockDefaultView inherit directly from ActionableView
RotationLockDefaultView was inheriting from TrayItemMore to be able to
use its layout. However, it did not use TrayItemMore's chevron or
detailed view transition. This patch changes RotationLockDefaultView to
inherit directly from ActionableView and use factory functions in
TrayPopupUtils to layout its contents.
This patch also fixes an issue with rotation lock row where its label
was not updated properly when rotation lock status was changed (e.g.
due to use of rotation shortcut).
This patch is a prerequisite for fixing correct theming and ripple
animation for non-clickable rows in the lock screen.
BUG=687689
TEST=TrayRotationLockTest.* in ash_unittests, manual
Review-Url: https://codereview.chromium.org/2696703005
Cr-Commit-Position: refs/heads/master@{#451139}
Committed: https://chromium.googlesource.com/chromium/src/+/39de08056d4d8cb6a4f2928b4c142f907c37e6b7
Patch Set 1 #Patch Set 2 : Added accessibility support #Patch Set 3 : Cleanup #Patch Set 4 : Observe missing case #
Total comments: 9
Patch Set 5 : Rebased #Patch Set 6 : nits #Patch Set 7 : Rebased #
Dependent Patchsets: Messages
Total messages: 33 (24 generated)
The CQ bit was checked by mohsen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by mohsen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
mohsen@chromium.org changed reviewers: + stevenjb@chromium.org
Please take a look...
stevenjb@chromium.org changed reviewers: + tdanderson@chromium.org
I am not the best person to review this any more. tdanderson@ - Could you take a look, and why haven't we added you to /ash/system/OWNERS yet? cc:jamescook@
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2017/02/14 19:29:11, stevenjb wrote: > I am not the best person to review this any more. > > tdanderson@ - Could you take a look, and why haven't we added you to > /ash/system/OWNERS yet? > > cc:jamescook@ tdanderson definitely deserves to be in //ash/system/OWNERS - that was an oversight on my part. Sending https://codereview.chromium.org/2699493002 to add him.
The CQ bit was checked by mohsen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
stevenjb@: Thanks tdanderson@: I'd missed one case when observing screen rotation controller which is now fixed. Please take a look at the latest patch set...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Very nice, LGTM with one question/comment about observer removal. https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... File ash/system/chromeos/rotation/tray_rotation_lock.cc (left): https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:188: if (!observing_shell_) It seems that by removing these checks, your CL opens up the possibility of attempting to remove the same observer twice (for instance, I think this can happen on lines 168 and 193; are you sure you need both?) However it seems that RemoveObserver() is a no-op in such a case (i.e., doesn't hit a DCHECK like in AddObserver()) but nevertheless it would be nice to remove any calls that are never needed. https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... File ash/system/chromeos/rotation/tray_rotation_lock.cc (right): https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:32: namespace { nit: new line after lines 32 and 43 https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:44: } // namespce nit: 'namespace' https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:59: // Stop observing rotation locak status. nit: 'lock'
The CQ bit was checked by mohsen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... File ash/system/chromeos/rotation/tray_rotation_lock.cc (left): https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:188: if (!observing_shell_) On 2017/02/16 at 01:00:12, tdanderson wrote: > It seems that by removing these checks, your CL opens up the possibility of attempting to remove the same observer twice (for instance, I think this can happen on lines 168 and 193; are you sure you need both?) > > However it seems that RemoveObserver() is a no-op in such a case (i.e., doesn't hit a DCHECK like in AddObserver()) but nevertheless it would be nice to remove any calls that are never needed. Yes, since the RemoveObserver() can handle multiple removals of an observer, the manual bookkeeping is not needed here. Both calls for removal of rotation observer (lines 188 and 192) are needed as each of them can happen before/without the other one. For the shell observer, I can't say for sure that both calls are needed, however, TrayRotationLockTest's are failing. This might be because of how tests are set up, but, I'd rather stay on the safe side and keep both calls. WDYT? https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... File ash/system/chromeos/rotation/tray_rotation_lock.cc (right): https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:32: namespace { On 2017/02/16 at 01:00:12, tdanderson wrote: > nit: new line after lines 32 and 43 Done. https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:44: } // namespce On 2017/02/16 at 01:00:12, tdanderson wrote: > nit: 'namespace' Done. https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:59: // Stop observing rotation locak status. On 2017/02/16 at 01:00:12, tdanderson wrote: > nit: 'lock' Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
PS6 still LGTM https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... File ash/system/chromeos/rotation/tray_rotation_lock.cc (left): https://codereview.chromium.org/2696703005/diff/50001/ash/system/chromeos/rot... ash/system/chromeos/rotation/tray_rotation_lock.cc:188: if (!observing_shell_) On 2017/02/16 04:15:17, mohsen wrote: > On 2017/02/16 at 01:00:12, tdanderson wrote: > > It seems that by removing these checks, your CL opens up the possibility of > attempting to remove the same observer twice (for instance, I think this can > happen on lines 168 and 193; are you sure you need both?) > > > > However it seems that RemoveObserver() is a no-op in such a case (i.e., > doesn't hit a DCHECK like in AddObserver()) but nevertheless it would be nice to > remove any calls that are never needed. > > Yes, since the RemoveObserver() can handle multiple removals of an observer, the > manual bookkeeping is not needed here. > > Both calls for removal of rotation observer (lines 188 and 192) are needed as > each of them can happen before/without the other one. For the shell observer, I > can't say for sure that both calls are needed, however, TrayRotationLockTest's > are failing. This might be because of how tests are set up, but, I'd rather stay > on the safe side and keep both calls. > > WDYT? Sounds fine by me, thanks.
The CQ bit was checked by mohsen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by mohsen@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tdanderson@chromium.org Link to the patchset: https://codereview.chromium.org/2696703005/#ps110001 (title: "Rebased")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 110001, "attempt_start_ts": 1487282495360640,
"parent_rev": "3bc4fa6a738e393013822dbffaa25b02551803d3", "commit_rev":
"39de08056d4d8cb6a4f2928b4c142f907c37e6b7"}
Message was sent while issue was closed.
Description was changed from ========== Make RotationLockDefaultView inherit directly from ActionableView RotationLockDefaultView was inheriting from TrayItemMore to be able to use its layout. However, it did not use TrayItemMore's chevron or detailed view transition. This patch changes RotationLockDefaultView to inherit directly from ActionableView and use factory functions in TrayPopupUtils to layout its contents. This patch also fixes an issue with rotation lock row where its label was not updated properly when rotation lock status was changed (e.g. due to use of rotation shortcut). This patch is a prerequisite for fixing correct theming and ripple animation for non-clickable rows in the lock screen. BUG=687689 TEST=TrayRotationLockTest.* in ash_unittests, manual ========== to ========== Make RotationLockDefaultView inherit directly from ActionableView RotationLockDefaultView was inheriting from TrayItemMore to be able to use its layout. However, it did not use TrayItemMore's chevron or detailed view transition. This patch changes RotationLockDefaultView to inherit directly from ActionableView and use factory functions in TrayPopupUtils to layout its contents. This patch also fixes an issue with rotation lock row where its label was not updated properly when rotation lock status was changed (e.g. due to use of rotation shortcut). This patch is a prerequisite for fixing correct theming and ripple animation for non-clickable rows in the lock screen. BUG=687689 TEST=TrayRotationLockTest.* in ash_unittests, manual Review-Url: https://codereview.chromium.org/2696703005 Cr-Commit-Position: refs/heads/master@{#451139} Committed: https://chromium.googlesource.com/chromium/src/+/39de08056d4d8cb6a4f2928b4c14... ==========
Message was sent while issue was closed.
Committed patchset #7 (id:110001) as https://chromium.googlesource.com/chromium/src/+/39de08056d4d8cb6a4f2928b4c14... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
