System modal dialog unhide shelf launcher, and prevents going into maximized mode.
commitcae0618f6fff0122063d231ff3217788707eaaaf
authorafakhry <afakhry@chromium.org>
Mon, 12 Jan 2015 17:57:43 +0000 (12 09:57 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 12 Jan 2015 17:58:37 +0000 (12 17:58 +0000)
tree4cd4b1e8d4ea309bda96a78bb1f8c9a7b1d8f11c
parent7a5b2859441e471e1ac8c459d997918af8e8cd0f
System modal dialog unhide shelf launcher, and prevents going into maximized mode.

When shelf is auto hidden, displaying a system modal dialog used to
unhide it. That was because the ShelfLayoutManager when updating the
shelf visibility, it used to ask the MruWindowTracker to build a list of
the windows. This list used to exclude the unfocusable windows (due to
the system modal dialog), So the returned list used to be empty which
means the shelf should be unhidden.

We actually need the list of all visible windows regardless of their
focusability.

Two unit tests has been written to validate the correct behavior in both
single and dual display modes.

BUG=277893, 447720
TEST=ash_unittests --gtest_filter=ShelfLayoutManagerTest.ShelfWithSystemModalWindowSingleDisplay, ShelfLayoutManagerTest.ShelfWithSystemModalWindowDualDisplay, MaximizeModeWindowManagerTest.GoingToMaximizedWithModalDialogPresent

Review URL: https://codereview.chromium.org/780113002

Cr-Commit-Position: refs/heads/master@{#311063}
13 files changed:
ash/accelerators/accelerator_controller.cc
ash/focus_cycler.cc
ash/shelf/shelf_layout_manager.cc
ash/shelf/shelf_layout_manager_unittest.cc
ash/shell.cc
ash/wm/ash_focus_rules.cc
ash/wm/ash_focus_rules.h
ash/wm/maximize_mode/maximize_mode_window_manager.cc
ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
ash/wm/mru_window_tracker.cc
ash/wm/mru_window_tracker.h
ash/wm/window_positioner.cc
chrome/browser/chromeos/extensions/wallpaper_private_api.cc