summaryrefslogtreecommitdiffstats
path: root/ash/wm/ash_focus_rules.h
diff options
context:
space:
mode:
authorafakhry <afakhry@chromium.org>2015-01-12 09:57:43 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-12 17:58:37 +0000
commitcae0618f6fff0122063d231ff3217788707eaaaf (patch)
tree4cd4b1e8d4ea309bda96a78bb1f8c9a7b1d8f11c /ash/wm/ash_focus_rules.h
parent7a5b2859441e471e1ac8c459d997918af8e8cd0f (diff)
downloadchromium_src-cae0618f6fff0122063d231ff3217788707eaaaf.zip
chromium_src-cae0618f6fff0122063d231ff3217788707eaaaf.tar.gz
chromium_src-cae0618f6fff0122063d231ff3217788707eaaaf.tar.bz2
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}
Diffstat (limited to 'ash/wm/ash_focus_rules.h')
-rw-r--r--ash/wm/ash_focus_rules.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/wm/ash_focus_rules.h b/ash/wm/ash_focus_rules.h
index f32ce87..70cf56997 100644
--- a/ash/wm/ash_focus_rules.h
+++ b/ash/wm/ash_focus_rules.h
@@ -18,6 +18,10 @@ class ASH_EXPORT AshFocusRules : public ::wm::BaseFocusRules {
AshFocusRules();
~AshFocusRules() override;
+ // Tests if the given |window| can be activated, ignoring the system modal
+ // dialog state.
+ bool IsWindowConsideredActivatable(aura::Window* window) const;
+
private:
// Overridden from ::wm::BaseFocusRules:
bool SupportsChildActivation(aura::Window* window) const override;