[go: nahoru, domu]

Separate AppListButton view from business logic

AppListButton observes several global states to change how it draws
itself, based on Tablet Mode, App List visibility, etc. It also has
complex Assistant-related logic.

This CL moves this business logic to AppListButtonController, so that
AppListButton only has to know how to paint. The controller observes
global state and directs AppListButton to animate itself to different
states as needed.

This will allow changing the controller logic without affecting the
button, and changing the button style (and how different states are
represented) without affecting the controller logic.

Bug: 937549
Change-Id: I8bededc22e06675da46e6fa8b91f7eea46ed87cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529078
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643148}
9 files changed