-
Cattalyya Nuengsigkapian authored
This is a reland of http://crrev.com/c/2581684, which was reverted by http://crrev.com/c/2601580 due to flakiness of the test NoWindowInActiveDesk. The issue is that CompleteCycling() activates a window in another desk, so deskSwitchAnimation takes a screenshot and sometimes fail if the test ends before it is taken. TBR=afakhry@chromium.org Original CL description: - Add a tab slider and update windows shown in Alt-Tab so that "Current desk" mode only display windows in the active desk, while "All desks" display all windows. - Handle special cases: As before, entering Alt-Tab with less than two windows aren't allowed. However, if users switch from the all-desks mode to the current-desk mode resulting in zero or one window, it should show "no recent items" or show a window consecutively. - Hide behind Bento flag and make sure to overwrite kLimitAltTabToActiveDesk in case of conflict, so the old flag works. - Disable remapping Alt+LeftClick to a right click when using Alt-Tab. - Ash unittests for switching between modes and special cases. Bug: 1142726 Test: A manual test (a video in crbug) and unit tests `ash_unittests --gtest_filter=ModeSelectionWindowCycleControllerTest.*` Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2581684Reviewed-by:
Ahmed Fakhry <afakhry@chromium.org> Reviewed-by:
Xiaoqian Dai <xdai@chromium.org> Commit-Queue: Cattalyya Nuengsigkapian <cattalyya@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#838709} Change-Id: I52c67cbb878fc33dac5ee0d8b59cc4310eb08f00 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2601480 Cr-Commit-Position: refs/heads/master@{#839175}
a9661d0a