Update home visibility when top window starts hiding

This makes home launcher visibility change happen sooner when the last
visible app window is hidden (to when the window starts hiding, instead
of when the currently active window changes).

The main benefit is that, during window minimization to shelf, the home
visibility, and the new hotseat state is calculated before the target
shelf item icon bounds for the minimizing window. In other words, the
target hotseat bounds will be known when the window minimization animation
is set up.

Additionally, this makes ShouldHomeLauncherBeVisible check in
shelf_layout_manager redundant (as target visibility returned by
AppListControllerImpl should now cover the state where the last window
was hidden, but the new active window has not yet been set).

BUG=1030819

Change-Id: I405e1fda018c4b0681bcf9a1a74266a37cd634d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1999443
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731666}
3 files changed