OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/maximize_mode/maximize_mode_window_state.h" | 10 #include "ash/wm/maximize_mode/maximize_mode_window_state.h" |
11 #include "ash/wm/maximize_mode/workspace_backdrop_delegate.h" | 11 #include "ash/wm/maximize_mode/workspace_backdrop_delegate.h" |
12 #include "ash/wm/mru_window_tracker.h" | 12 #include "ash/wm/mru_window_tracker.h" |
13 #include "ash/wm/overview/window_selector_controller.h" | 13 #include "ash/wm/overview/window_selector_controller.h" |
14 #include "ash/wm/wm_event.h" | 14 #include "ash/wm/wm_event.h" |
15 #include "ash/wm/workspace_controller.h" | 15 #include "ash/wm/workspace_controller.h" |
16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
17 #include "ui/gfx/screen.h" | 17 #include "ui/gfx/screen.h" |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 | 20 |
21 MaximizeModeWindowManager::~MaximizeModeWindowManager() { | 21 MaximizeModeWindowManager::~MaximizeModeWindowManager() { |
22 // Overview mode needs to be ended before exiting maximize mode to prevent | |
23 // transforming windows which are currently in | |
24 // overview: http://crbug.com/366605 | |
25 WindowSelectorController* controller = | |
26 Shell::GetInstance()->window_selector_controller(); | |
27 if (controller && controller->IsSelecting()) | |
28 controller->OnSelectionCanceled(); | |
Mr4D (OOO till 08-26)
2014/04/29 19:45:21
Could you put that into a utility function (maybe
flackr
2014/04/29 20:56:10
Done.
| |
22 Shell::GetInstance()->RemoveShellObserver(this); | 29 Shell::GetInstance()->RemoveShellObserver(this); |
23 Shell::GetScreen()->RemoveObserver(this); | 30 Shell::GetScreen()->RemoveObserver(this); |
24 EnableBackdropBehindTopWindowOnEachDisplay(false); | 31 EnableBackdropBehindTopWindowOnEachDisplay(false); |
25 RemoveWindowCreationObservers(); | 32 RemoveWindowCreationObservers(); |
26 RestoreAllWindows(); | 33 RestoreAllWindows(); |
27 Shell::GetInstance()->OnMaximizeModeEnded(); | 34 Shell::GetInstance()->OnMaximizeModeEnded(); |
28 } | 35 } |
29 | 36 |
30 int MaximizeModeWindowManager::GetNumberOfManagedWindows() { | 37 int MaximizeModeWindowManager::GetNumberOfManagedWindows() { |
31 return window_state_map_.size(); | 38 return window_state_map_.size(); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 RootWindowController* controller = *iter; | 226 RootWindowController* controller = *iter; |
220 aura::Window* container = Shell::GetContainer( | 227 aura::Window* container = Shell::GetContainer( |
221 controller->GetRootWindow(), kShellWindowId_DefaultContainer); | 228 controller->GetRootWindow(), kShellWindowId_DefaultContainer); |
222 controller->workspace_controller()->SetMaximizeBackdropDelegate( | 229 controller->workspace_controller()->SetMaximizeBackdropDelegate( |
223 scoped_ptr<WorkspaceLayoutManagerDelegate>( | 230 scoped_ptr<WorkspaceLayoutManagerDelegate>( |
224 enable ? new WorkspaceBackdropDelegate(container) : NULL)); | 231 enable ? new WorkspaceBackdropDelegate(container) : NULL)); |
225 } | 232 } |
226 } | 233 } |
227 | 234 |
228 } // namespace ash | 235 } // namespace ash |
OLD | NEW |