-
Toni Barzic authored
Original attempt CL:1888652 got reverted because a new usage popped up. HomeLauncherGestureHandler currently has three observers: 1. AppListControllerImpl, which is also a HomeScreenDelegate implementation (on which HomeScreenGestureHandler already depends, so additional observer interface just obscures/complicates this dependency) 2. HomeLauncherStateWaiter which is used by interactive UI/perf tests to wait for launcher animations to complete 3. BackdropController which pauses backdrop updates while home launcher drag is in progress (this landed in parallel with first attempt of landing this) For case 1., moving the observer methods to HomeScreenDelegate interface will work fine. For case 2., the test waiter can register a callback with AppListControllerImpl to be run when the home launcher animations are complete - the same way it's done by LauncherStateWaiter, an equivalent test waiter used in clamshell mode (or for waiting for non-visibility app list state transitions) For case 3. the dependency is switched - instead of BackdropController observering HomeLauncherGestureHandler for drag events, HomeLauncherGestureHandler requests pause in backdrop updates while home launcher state transitions are in progress. Given that HomeLauncherGestureHandler already depends in BackdropController (to animate backdrop window), this removes newly added circular dependency. BUG=1005366 Change-Id: I73e249eaf41d8ccf1e349dfa6ba023eccb97159a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894464Reviewed-by:
Mitsuru Oshima <oshima@chromium.org> Reviewed-by:
Sammie Quon <sammiequon@chromium.org> Commit-Queue: Toni Baržić <tbarzic@chromium.org> Cr-Commit-Position: refs/heads/master@{#712224}
d770f6a8