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

Issue 2573703003: chromeos: Fix shelf appearing at login screen under mash (Closed)

Created:
4 years ago by James Cook
Modified:
3 years, 11 months ago
Reviewers:
msw, xiyuan
CC:
chromium-reviews, alemate+watch_chromium.org, sadrul, tfarina, achuith+watch_chromium.org, oshima+watch_chromium.org, kalyank, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

chromeos: Fix shelf appearing at login screen under mash Previously chrome --mash would always create the shelf on startup, even at the login screen. Now it waits until login is complete, like classic ash. Ash watches for SessionState::ACTIVE via a SessionStateObserver to create the shelf, rather than NOTIFICATION_LOGIN_USER_PROFILE_PREPARED. For most login flows this doesn't matter, but for supervised user creation it means that the shelf is not created until the flow is completed. This is an improvement because in the old code the shelf would be created too early and had to be explicitly hidden. Always create a SessionControllerClient in chrome, even in classic ash. This allows classic ash to use the mojo pathway via ash::SessionController. Remove WmShell::ShowShelf(), which was introduced in crrev.com/10693003 to delay showing the shelf until post-login OOBE (like avatar picture select) was complete. It does not seem to be needed anymore, either in production or in tests. Change AshTestImplMus to simulate a user logging in which is required to create the shelf on the primary display and also to have a non-zero user count to create the shelf on additional displays. Remove some unnecessary OS_CHROMEOS ifdefs in //c/b/ui/ash. BUG=666021 TEST=ash_unittests and chrome browser_tests Committed: https://crrev.com/7f99e933e595824281102ff6737075dccbbc4d5c Cr-Commit-Position: refs/heads/master@{#439845}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : rebase onto xiyuan #

Patch Set 4 : logging for test run, BrowserTest.GetSizeForNewRenderView failing #

Patch Set 5 : rebase on session change, fix tests #

Total comments: 23

Patch Set 6 : ShelfController is-a SessionStateObserver, review comments #

Patch Set 7 : WmShell is SessionStateObserver #

Patch Set 8 : rebase #

Patch Set 9 : add simulated login to mus ash tests #

Patch Set 10 : rebase and cleanup #

Total comments: 4

Patch Set 11 : msw comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -84 lines) Patch
M ash/aura/wm_shell_aura.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M ash/aura/wm_shell_aura.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M ash/common/shelf/shelf_widget.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M ash/common/shelf/shelf_widget.cc View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download
M ash/common/test/test_session_state_delegate.cc View 1 2 3 4 5 9 1 chunk +3 lines, -6 lines 0 comments Download
M ash/common/wm_root_window_controller.h View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M ash/common/wm_root_window_controller.cc View 1 2 3 4 1 chunk +0 lines, -9 lines 0 comments Download
M ash/common/wm_shell.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +6 lines, -5 lines 0 comments Download
M ash/common/wm_shell.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -6 lines 0 comments Download
M ash/mus/test/ash_test_impl_mus.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M ash/mus/test/ash_test_impl_mus.cc View 1 2 3 4 5 6 7 8 9 3 chunks +30 lines, -0 lines 0 comments Download
M ash/mus/window_manager.cc View 9 3 chunks +4 lines, -5 lines 0 comments Download
M ash/root_window_controller_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -3 lines 0 comments Download
M ash/shell.h View 1 chunk +0 lines, -3 lines 0 comments Download
M ash/shell.cc View 1 6 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/login/session/chrome_session_manager.cc View 1 2 3 4 9 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/supervised/supervised_user_creation_screen.cc View 1 2 3 4 2 chunks +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.cc View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/multi_user/multi_user_window_manager_stub.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/multi_user/multi_user_window_manager_stub.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/session_controller_client.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/session_controller_client.cc View 1 2 3 4 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc View 1 2 3 4 5 6 7 6 chunks +8 lines, -22 lines 0 comments Download

Messages

Total messages: 55 (43 generated)
James Cook
msw, please take a look at ash/* xiyuan, please take a look at chrome/* https://codereview.chromium.org/2573703003/diff/80001/chrome/browser/chromeos/login/session/chrome_session_manager.cc ...
4 years ago (2016-12-16 01:28:27 UTC) #18
msw
https://codereview.chromium.org/2573703003/diff/80001/ash/aura/wm_shell_aura.cc File ash/aura/wm_shell_aura.cc (right): https://codereview.chromium.org/2573703003/diff/80001/ash/aura/wm_shell_aura.cc#newcode250 ash/aura/wm_shell_aura.cc:250: CreateShelf(); It's a bit odd that we'll potentially call ...
4 years ago (2016-12-16 16:26:20 UTC) #21
James Cook
xiyuan / msw - please hold off for now. I'm dealing with some test failures ...
4 years ago (2016-12-19 17:43:04 UTC) #26
James Cook
msw and xiyuan, please take another look. (And thanks, xiyuan, for all your help with ...
4 years ago (2016-12-20 04:02:43 UTC) #38
msw
One comment, otherwise, lg https://codereview.chromium.org/2573703003/diff/80001/ash/common/wm_shell.h File ash/common/wm_shell.h (right): https://codereview.chromium.org/2573703003/diff/80001/ash/common/wm_shell.h#newcode104 ash/common/wm_shell.h:104: class ASH_EXPORT WmShell : public ...
4 years ago (2016-12-20 15:37:30 UTC) #41
James Cook
msw / xiyuan, please take another look. https://codereview.chromium.org/2573703003/diff/80001/ash/common/wm_shell.h File ash/common/wm_shell.h (right): https://codereview.chromium.org/2573703003/diff/80001/ash/common/wm_shell.h#newcode104 ash/common/wm_shell.h:104: class ASH_EXPORT ...
4 years ago (2016-12-20 17:27:19 UTC) #43
xiyuan
lgtm
4 years ago (2016-12-20 17:28:36 UTC) #45
msw
lgtm
4 years ago (2016-12-20 17:43:22 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2573703003/240001
4 years ago (2016-12-20 17:56:23 UTC) #49
commit-bot: I haz the power
Committed patchset #11 (id:240001)
4 years ago (2016-12-20 18:11:12 UTC) #52
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/7f99e933e595824281102ff6737075dccbbc4d5c Cr-Commit-Position: refs/heads/master@{#439845}
4 years ago (2016-12-20 18:15:16 UTC) #54
James Cook
3 years, 11 months ago (2017-01-10 00:55:08 UTC) #55
Message was sent while issue was closed.
On 2016/12/20 18:15:16, commit-bot: I haz the power wrote:
> Patchset 11 (id:??) landed as
> https://crrev.com/7f99e933e595824281102ff6737075dccbbc4d5c
> Cr-Commit-Position: refs/heads/master@{#439845}

This CL causes crbug.com/679513 Chrome_ChromeOS: Crash Report -
ash::ShelfView::GetIdealBoundsOfItemIcon, which is the top crash in M57 dev.
It's caused by having a minimized browser window during session restore.

I'm reverting in https://codereview.chromium.org/2619943002 (there were trivial
conflicts I had to resolve).

Powered by Google App Engine
This is Rietveld 408576698