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

Side by Side Diff: ash/common/wm_shell.cc

Issue 2194353002: mash: Migrate ScopedTargetRootWindow to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: non-virtual Created 4 years, 4 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/wm_shell.h ('k') | ash/display/screen_position_controller.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_shell.h" 5 #include "ash/common/wm_shell.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/accelerators/ash_focus_manager_factory.h" 10 #include "ash/common/accelerators/ash_focus_manager_factory.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 window_cycle_controller_(new WindowCycleController), 137 window_cycle_controller_(new WindowCycleController),
138 window_selector_controller_(new WindowSelectorController) { 138 window_selector_controller_(new WindowSelectorController) {
139 #if defined(OS_CHROMEOS) 139 #if defined(OS_CHROMEOS)
140 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos); 140 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos);
141 keyboard_brightness_control_delegate_.reset(new KeyboardBrightnessController); 141 keyboard_brightness_control_delegate_.reset(new KeyboardBrightnessController);
142 #endif 142 #endif
143 } 143 }
144 144
145 WmShell::~WmShell() {} 145 WmShell::~WmShell() {}
146 146
147 WmWindow* WmShell::GetRootWindowForNewWindows() {
148 if (scoped_root_window_for_new_windows_)
149 return scoped_root_window_for_new_windows_;
150 return root_window_for_new_windows_;
151 }
152
147 bool WmShell::IsSystemModalWindowOpen() { 153 bool WmShell::IsSystemModalWindowOpen() {
148 if (simulate_modal_window_open_for_testing_) 154 if (simulate_modal_window_open_for_testing_)
149 return true; 155 return true;
150 156
151 // Traverse all system modal containers, and find its direct child window 157 // Traverse all system modal containers, and find its direct child window
152 // with "SystemModal" setting, and visible. 158 // with "SystemModal" setting, and visible.
153 for (WmWindow* root : GetAllRootWindows()) { 159 for (WmWindow* root : GetAllRootWindows()) {
154 WmWindow* system_modal = 160 WmWindow* system_modal =
155 root->GetChildByShellWindowId(kShellWindowId_SystemModalContainer); 161 root->GetChildByShellWindowId(kShellWindowId_SystemModalContainer);
156 if (!system_modal) 162 if (!system_modal)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void WmShell::DeleteToastManager() { 261 void WmShell::DeleteToastManager() {
256 toast_manager_.reset(); 262 toast_manager_.reset();
257 } 263 }
258 264
259 void WmShell::SetAcceleratorController( 265 void WmShell::SetAcceleratorController(
260 std::unique_ptr<AcceleratorController> accelerator_controller) { 266 std::unique_ptr<AcceleratorController> accelerator_controller) {
261 accelerator_controller_ = std::move(accelerator_controller); 267 accelerator_controller_ = std::move(accelerator_controller);
262 } 268 }
263 269
264 } // namespace ash 270 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/display/screen_position_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698