• jamescook's avatar
    chromeos: Fix shelf appearing at login screen under mash · 7f99e933
    jamescook authored
    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
    
    Review-Url: https://codereview.chromium.org/2573703003
    Cr-Commit-Position: refs/heads/master@{#439845}
    7f99e933
shell.cc 32.6 KB