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/common/wm/maximize_mode/maximize_mode_window_manager.h" | 5 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" |
6 | 6 |
7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
9 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
10 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" | 10 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 MaximizeAllWindows(); | 164 MaximizeAllWindows(); |
165 AddWindowCreationObservers(); | 165 AddWindowCreationObservers(); |
166 EnableBackdropBehindTopWindowOnEachDisplay(true); | 166 EnableBackdropBehindTopWindowOnEachDisplay(true); |
167 display::Screen::GetScreen()->AddObserver(this); | 167 display::Screen::GetScreen()->AddObserver(this); |
168 WmShell::Get()->AddShellObserver(this); | 168 WmShell::Get()->AddShellObserver(this); |
169 event_handler_ = WmShell::Get()->CreateMaximizeModeEventHandler(); | 169 event_handler_ = WmShell::Get()->CreateMaximizeModeEventHandler(); |
170 } | 170 } |
171 | 171 |
172 void MaximizeModeWindowManager::MaximizeAllWindows() { | 172 void MaximizeModeWindowManager::MaximizeAllWindows() { |
173 MruWindowTracker::WindowList windows = | 173 MruWindowTracker::WindowList windows = |
174 WmShell::Get()->GetMruWindowTracker()->BuildWindowListIgnoreModal(); | 174 WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(); |
175 // Add all existing Mru windows. | 175 // Add all existing Mru windows. |
176 for (WmWindow* window : windows) | 176 for (WmWindow* window : windows) |
177 MaximizeAndTrackWindow(window); | 177 MaximizeAndTrackWindow(window); |
178 } | 178 } |
179 | 179 |
180 void MaximizeModeWindowManager::RestoreAllWindows() { | 180 void MaximizeModeWindowManager::RestoreAllWindows() { |
181 while (window_state_map_.size()) | 181 while (window_state_map_.size()) |
182 ForgetWindow(window_state_map_.begin()->first); | 182 ForgetWindow(window_state_map_.begin()->first); |
183 } | 183 } |
184 | 184 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) { | 276 for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) { |
277 WmRootWindowController* controller = root->GetRootWindowController(); | 277 WmRootWindowController* controller = root->GetRootWindowController(); |
278 WmWindow* default_container = | 278 WmWindow* default_container = |
279 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer); | 279 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer); |
280 controller->SetMaximizeBackdropDelegate(base::WrapUnique( | 280 controller->SetMaximizeBackdropDelegate(base::WrapUnique( |
281 enable ? new WorkspaceBackdropDelegate(default_container) : nullptr)); | 281 enable ? new WorkspaceBackdropDelegate(default_container) : nullptr)); |
282 } | 282 } |
283 } | 283 } |
284 | 284 |
285 } // namespace ash | 285 } // namespace ash |
OLD | NEW |