| OLD | NEW |
| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 RootWindowController* WmShell::GetPrimaryRootWindowController() { | 311 RootWindowController* WmShell::GetPrimaryRootWindowController() { |
| 312 return GetPrimaryRootWindow()->GetRootWindowController(); | 312 return GetPrimaryRootWindow()->GetRootWindowController(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 WmWindow* WmShell::GetRootWindowForNewWindows() { | 315 WmWindow* WmShell::GetRootWindowForNewWindows() { |
| 316 if (scoped_root_window_for_new_windows_) | 316 if (scoped_root_window_for_new_windows_) |
| 317 return scoped_root_window_for_new_windows_; | 317 return scoped_root_window_for_new_windows_; |
| 318 return root_window_for_new_windows_; | 318 return root_window_for_new_windows_; |
| 319 } | 319 } |
| 320 | 320 |
| 321 bool WmShell::IsForceMaximizeOnFirstRun() { |
| 322 return delegate()->IsForceMaximizeOnFirstRun(); |
| 323 } |
| 324 |
| 321 bool WmShell::IsSystemModalWindowOpen() { | 325 bool WmShell::IsSystemModalWindowOpen() { |
| 322 if (simulate_modal_window_open_for_testing_) | 326 if (simulate_modal_window_open_for_testing_) |
| 323 return true; | 327 return true; |
| 324 | 328 |
| 325 // Traverse all system modal containers, and find its direct child window | 329 // Traverse all system modal containers, and find its direct child window |
| 326 // with "SystemModal" setting, and visible. | 330 // with "SystemModal" setting, and visible. |
| 327 for (WmWindow* root : GetAllRootWindows()) { | 331 for (WmWindow* root : GetAllRootWindows()) { |
| 328 WmWindow* system_modal = | 332 WmWindow* system_modal = |
| 329 root->GetChildByShellWindowId(kShellWindowId_SystemModalContainer); | 333 root->GetChildByShellWindowId(kShellWindowId_SystemModalContainer); |
| 330 if (!system_modal) | 334 if (!system_modal) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 465 |
| 462 void WmShell::OnAttemptToReactivateWindow(aura::Window* request_active, | 466 void WmShell::OnAttemptToReactivateWindow(aura::Window* request_active, |
| 463 aura::Window* actual_active) { | 467 aura::Window* actual_active) { |
| 464 for (auto& observer : activation_observers_) { | 468 for (auto& observer : activation_observers_) { |
| 465 observer.OnAttemptToReactivateWindow(WmWindow::Get(request_active), | 469 observer.OnAttemptToReactivateWindow(WmWindow::Get(request_active), |
| 466 WmWindow::Get(actual_active)); | 470 WmWindow::Get(actual_active)); |
| 467 } | 471 } |
| 468 } | 472 } |
| 469 | 473 |
| 470 } // namespace ash | 474 } // namespace ash |
| OLD | NEW |