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

Issue 1851883002: Cleanup shelf initialization and observation. (Closed)

Created:
4 years, 8 months ago by msw
Modified:
4 years, 8 months ago
Reviewers:
sky
CC:
chromium-reviews, kalyank, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup shelf initialization and observation. Add ShelfDelegate::OnShelf[Alignment|AutoHideBehavior]Changed. (needed for mus: https://codereview.chromium.org/1839223003) (simplifies ChromeLauncherController shelf observation) Remove ShelfLayoutManagerObserver::OnAutoHideBehaviorChanged. Add Shell[Observer]::OnShelfAutoHideBehaviorChanged (similar to alignment calls, used for ShelfLayoutManager) Move alignment and auto-hide properties to Shelf class. (lets us better encapsulate ShelfLayoutManager) Simplify Shell functions that access shelf properties. Init Shell's ShelfModel earlier (removes ordering constraint). Call OnShelfCreated after ShelfWidget::shelf_ is actually set. Make ChromeLauncherController set properties in OnShelfCreated. (not before the actual shelf exists; update tests similarly) Skip redundant *FromPrefs init; see SetShelfBehaviorsFromPrefs. Inline SetShelfAutoHideBehaviorPrefs (like alignment). BUG=557406 TEST=No regressions R=sky@chromium.org Committed: https://crrev.com/174379b507800b1fd819bb8907644682e9a6302a Cr-Commit-Position: refs/heads/master@{#385060}

Patch Set 1 #

Patch Set 2 : Major refactoring; no crash on chrome startup. #

Patch Set 3 : Working on it with temp accessors. #

Patch Set 4 : Cleanup; update tests. #

Patch Set 5 : Sync and rebase. #

Patch Set 6 : Cleanup #

Patch Set 7 : Fix tests. #

Patch Set 8 : Check for shelf before setting prefs in ChromeLauncherController. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+319 lines, -294 lines) Patch
M ash/mus/shelf_delegate_mus.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ash/mus/shelf_delegate_mus.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M ash/root_window_controller_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -7 lines 0 comments Download
M ash/shelf/shelf.h View 1 2 3 4 5 2 chunks +11 lines, -2 lines 0 comments Download
M ash/shelf/shelf.cc View 1 2 3 4 5 2 chunks +26 lines, -7 lines 1 comment Download
M ash/shelf/shelf_alignment_menu.cc View 1 2 3 4 2 chunks +3 lines, -6 lines 0 comments Download
M ash/shelf/shelf_delegate.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M ash/shelf/shelf_layout_manager.h View 1 2 3 4 5 6 chunks +23 lines, -28 lines 0 comments Download
M ash/shelf/shelf_layout_manager.cc View 1 2 3 4 5 6 10 chunks +37 lines, -64 lines 0 comments Download
M ash/shelf/shelf_layout_manager_observer.h View 1 chunk +0 lines, -4 lines 0 comments Download
M ash/shelf/shelf_view_unittest.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M ash/shelf/shelf_widget.h View 1 1 chunk +3 lines, -4 lines 0 comments Download
M ash/shelf/shelf_widget.cc View 1 2 3 4 5 2 chunks +8 lines, -12 lines 0 comments Download
M ash/shelf/shelf_widget_unittest.cc View 1 2 3 6 chunks +64 lines, -20 lines 0 comments Download
M ash/shell.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ash/shell.cc View 1 5 chunks +11 lines, -10 lines 0 comments Download
M ash/shell/shelf_delegate_impl.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ash/shell/shelf_delegate_impl.cc View 1 2 chunks +9 lines, -10 lines 0 comments Download
M ash/shell_observer.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ash/test/test_shelf_delegate.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ash/test/test_shelf_delegate.cc View 1 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.h View 1 8 chunks +2 lines, -20 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc View 1 2 3 4 6 7 10 chunks +86 lines, -96 lines 0 comments Download

Messages

Total messages: 35 (16 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1851883002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1851883002/1
4 years, 8 months ago (2016-04-01 18:57:26 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-01 19:52:32 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1851883002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1851883002/100001
4 years, 8 months ago (2016-04-04 19:31:19 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/199027)
4 years, 8 months ago (2016-04-04 19:52:06 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1851883002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1851883002/120001
4 years, 8 months ago (2016-04-04 20:50:44 UTC) #15
msw
Hey Scott, please take a look; thanks! +CC James for FYI.
4 years, 8 months ago (2016-04-04 20:50:47 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/149039)
4 years, 8 months ago (2016-04-04 21:32:37 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1851883002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1851883002/140001
4 years, 8 months ago (2016-04-04 21:57:11 UTC) #20
sky
https://codereview.chromium.org/1851883002/diff/140001/ash/shelf/shelf.cc File ash/shelf/shelf.cc (right): https://codereview.chromium.org/1851883002/diff/140001/ash/shelf/shelf.cc#newcode87 ash/shelf/shelf.cc:87: return locked ? SHELF_ALIGNMENT_BOTTOM : alignment_; Seems unusual to ...
4 years, 8 months ago (2016-04-04 22:44:32 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-04 23:11:26 UTC) #23
sky
On 2016/04/04 22:44:32, sky wrote: > https://codereview.chromium.org/1851883002/diff/140001/ash/shelf/shelf.cc > File ash/shelf/shelf.cc (right): > > https://codereview.chromium.org/1851883002/diff/140001/ash/shelf/shelf.cc#newcode87 > ...
4 years, 8 months ago (2016-04-04 23:59:21 UTC) #24
sky
LGTM
4 years, 8 months ago (2016-04-04 23:59:29 UTC) #25
msw
On 2016/04/04 23:59:21, sky wrote: > On 2016/04/04 22:44:32, sky wrote: > > https://codereview.chromium.org/1851883002/diff/140001/ash/shelf/shelf.cc > ...
4 years, 8 months ago (2016-04-05 00:08:04 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1851883002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1851883002/140001
4 years, 8 months ago (2016-04-05 00:09:26 UTC) #28
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-04-05 00:25:19 UTC) #30
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/174379b507800b1fd819bb8907644682e9a6302a Cr-Commit-Position: refs/heads/master@{#385060}
4 years, 8 months ago (2016-04-05 00:27:01 UTC) #32
Daniel Kurtz
On 2016/04/05 00:27:01, commit-bot: I haz the power wrote: > Patchset 8 (id:??) landed as ...
4 years, 8 months ago (2016-04-11 10:17:15 UTC) #33
James Cook
On 2016/04/11 10:17:15, Daniel Kurtz wrote: > On 2016/04/05 00:27:01, commit-bot: I haz the power ...
4 years, 8 months ago (2016-04-11 15:02:20 UTC) #34
msw
4 years, 8 months ago (2016-04-11 16:41:04 UTC) #35
Message was sent while issue was closed.
On 2016/04/11 15:02:20, James Cook wrote:
> On 2016/04/11 10:17:15, Daniel Kurtz wrote:
> > On 2016/04/05 00:27:01, commit-bot: I haz the power wrote:
> > > Patchset 8 (id:??) landed as
> > > https://crrev.com/174379b507800b1fd819bb8907644682e9a6302a
> > > Cr-Commit-Position: refs/heads/master@{#385060}
> > 
> > A git bisect suggests that this patch causes crbug.com/602166 - the chrome
OS
> > clock/battery/keyboard have drifted up out from the shelf to the upper left
> > corner at the login screen.
> 
> I thought Mike fixed that issue with
https://codereview.chromium.org/1866113002/
> 
> "Fix Chrome OS Login status area layout.
> 
> Let ShelfLayoutManager perform layout before a shelf exists.
> Fixes a regression from https://codereview.chromium.org/1851883002%22

Yes, it should be fixed, I marked the bug as duplicate, lmk if any issues
persist.

Powered by Google App Engine
This is Rietveld 408576698