-
jamescook authored
The reland adds a fix for a crash in window animation code when restoring a session that has a minimized window. The animation tries to compute a shelf item position before the shelf is initialized. The animation is not visible to the user. Returning an empty rect results in a default target position, which is fine in this case. Added guards for access to ShelfView before shelf is initialized. Original CL description: 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, 679513 TEST=ash_unittests and chrome browser_tests Committed: https://crrev.com/7f99e933e595824281102ff6737075dccbbc4d5c Cr-Commit-Position: refs/heads/master@{#439845} Reverted: Review-Url: https://codereview.chromium.org/2619943002 Cr-Original-Commit-Position: refs/heads/master@{#442484} Review-Url: https://codereview.chromium.org/2625733003 Cr-Commit-Position: refs/heads/master@{#443106}
75298de7