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}