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

Side by Side Diff: ash/common/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 2766543002: Move even more from WmShell to Shell (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ash/common/system/user/user_card_view.cc ('k') | ash/common/wm/mru_window_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/wm/maximize_mode/maximize_mode_event_handler.h" 9 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h"
10 #include "ash/common/wm/maximize_mode/maximize_mode_window_state.h" 10 #include "ash/common/wm/maximize_mode/maximize_mode_window_state.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 MaximizeAllWindows(); 205 MaximizeAllWindows();
206 AddWindowCreationObservers(); 206 AddWindowCreationObservers();
207 EnableBackdropBehindTopWindowOnEachDisplay(true); 207 EnableBackdropBehindTopWindowOnEachDisplay(true);
208 display::Screen::GetScreen()->AddObserver(this); 208 display::Screen::GetScreen()->AddObserver(this);
209 Shell::GetInstance()->AddShellObserver(this); 209 Shell::GetInstance()->AddShellObserver(this);
210 event_handler_ = WmShell::Get()->CreateMaximizeModeEventHandler(); 210 event_handler_ = WmShell::Get()->CreateMaximizeModeEventHandler();
211 } 211 }
212 212
213 void MaximizeModeWindowManager::MaximizeAllWindows() { 213 void MaximizeModeWindowManager::MaximizeAllWindows() {
214 MruWindowTracker::WindowList windows = 214 MruWindowTracker::WindowList windows =
215 WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(); 215 Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal();
216 // Add all existing Mru windows. 216 // Add all existing Mru windows.
217 for (WmWindow* window : windows) 217 for (WmWindow* window : windows)
218 MaximizeAndTrackWindow(window); 218 MaximizeAndTrackWindow(window);
219 } 219 }
220 220
221 void MaximizeModeWindowManager::RestoreAllWindows() { 221 void MaximizeModeWindowManager::RestoreAllWindows() {
222 while (window_state_map_.size()) 222 while (window_state_map_.size())
223 ForgetWindow(window_state_map_.begin()->first); 223 ForgetWindow(window_state_map_.begin()->first);
224 } 224 }
225 225
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 RootWindowController* controller = root->GetRootWindowController(); 323 RootWindowController* controller = root->GetRootWindowController();
324 WmWindow* default_container = 324 WmWindow* default_container =
325 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer); 325 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer);
326 controller->workspace_controller()->SetMaximizeBackdropDelegate( 326 controller->workspace_controller()->SetMaximizeBackdropDelegate(
327 enable ? base::MakeUnique<WorkspaceBackdropDelegate>(default_container) 327 enable ? base::MakeUnique<WorkspaceBackdropDelegate>(default_container)
328 : nullptr); 328 : nullptr);
329 } 329 }
330 } 330 }
331 331
332 } // namespace ash 332 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/user/user_card_view.cc ('k') | ash/common/wm/mru_window_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698