cros: Cleanup shelf background animator
ShelfBackgroundAnimator determined color by looking at both ShelfBackgroundType and also the session state. ShelfBackgroundType was set from ShelfLayoutManager. Both ShelfLayoutManager and ShelfBackgroundAnimator observed session state changes and updated the shelf colors from that. This means that there were multiple color updates, and beyond that the rendered background type could diverge from what was requested by ShelfLayoutManager in the time between the two callbacks. Remove the ability for ShelfLayoutManager to observe session state changes, and encode the needed information in ShelfBackgroundType. This simplifies control flow and reduces complexity. Bug: 857221 Change-Id: I173e8cc47d7f6f22123814d341a94749472f7932 Reviewed-on: https://chromium-review.googlesource.com/1168028 Commit-Queue: Jacob Dufault <jdufault@chromium.org> Reviewed-by:James Cook <jamescook@chromium.org> Reviewed-by:
Michael Wasserman <msw@chromium.org> Cr-Commit-Position: refs/heads/master@{#582259}
Showing
Please register or sign in to comment