Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 262433002: Exit overview before exiting maximize mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create utility function to cancel overview. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_window_manager.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager.cc b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
index 964f77a10c8017570e70fc9774297fe507f8e200..1b9f9dbadb4b8d20950c9b9d46af965a4f8013b9 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
@@ -18,7 +18,24 @@
namespace ash {
+namespace {
+
+// Exits overview mode if it is currently active.
+void CancelOverview() {
+ WindowSelectorController* controller =
+ Shell::GetInstance()->window_selector_controller();
+ if (controller && controller->IsSelecting())
+ controller->OnSelectionCanceled();
+}
+
+} // namespace
+
MaximizeModeWindowManager::~MaximizeModeWindowManager() {
+ // Overview mode needs to be ended before exiting maximize mode to prevent
+ // transforming windows which are currently in
+ // overview: http://crbug.com/366605
+ CancelOverview();
+
Shell::GetInstance()->RemoveShellObserver(this);
Shell::GetScreen()->RemoveObserver(this);
EnableBackdropBehindTopWindowOnEachDisplay(false);
@@ -108,10 +125,7 @@ MaximizeModeWindowManager::MaximizeModeWindowManager()
: backdrops_hidden_(false) {
// The overview mode needs to be ended before the maximize mode is started. To
// guarantee the proper order, it will be turned off from here.
- WindowSelectorController* controller =
- Shell::GetInstance()->window_selector_controller();
- if (controller && controller->IsSelecting())
- controller->OnSelectionCanceled();
+ CancelOverview();
MaximizeAllWindows();
AddWindowCreationObservers();
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698