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

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

Issue 2115663002: Folds methods in WmShellCommon to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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/focus_cycler.cc ('k') | ash/common/wm/overview/window_selector.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/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
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
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
OLDNEW
« no previous file with comments | « ash/common/focus_cycler.cc ('k') | ash/common/wm/overview/window_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698