[Shelf] Calculate hotseat state transition with scoped class
Creating hotseat bounds animation which is triggered by hotseat state change requires the hotseat state transition type. However, the current method to calculate the transition type in HotseatWidget::SetState is hard to reset the stored transition type after the transition completes. In this CL, a scoped class is introduced to set/reset the transition type stored in HotseatWidget. Note that the only place to set the hotseat state then update the hotseat bounds is ShelfLayoutManager::SetState(). It ensures the correctness of this CL. Bug: 1024911 Change-Id: Ie68d182dbf105c4376898e7c0269a620194e6e6c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2235980Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Commit-Queue: Andrew Xu <andrewxu@chromium.org> Cr-Commit-Position: refs/heads/master@{#776238}
Showing
Please register or sign in to comment