OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 for (auto& observer : shell_observers_) | 299 for (auto& observer : shell_observers_) |
300 observer.OnAppTerminating(); | 300 observer.OnAppTerminating(); |
301 } | 301 } |
302 | 302 |
303 void Shell::OnLockStateChanged(bool locked) { | 303 void Shell::OnLockStateChanged(bool locked) { |
304 for (auto& observer : shell_observers_) | 304 for (auto& observer : shell_observers_) |
305 observer.OnLockStateChanged(locked); | 305 observer.OnLockStateChanged(locked); |
306 #ifndef NDEBUG | 306 #ifndef NDEBUG |
307 // Make sure that there is no system modal in Lock layer when unlocked. | 307 // Make sure that there is no system modal in Lock layer when unlocked. |
308 if (!locked) { | 308 if (!locked) { |
309 std::vector<WmWindow*> containers = wm::GetContainersFromAllRootWindows( | 309 aura::Window::Windows containers = wm::GetContainersFromAllRootWindows( |
310 kShellWindowId_LockSystemModalContainer, | 310 kShellWindowId_LockSystemModalContainer, GetPrimaryRootWindow()); |
311 WmWindow::Get(GetPrimaryRootWindow())); | 311 for (aura::Window* container : containers) |
312 for (WmWindow* container : containers) | 312 DCHECK(container->children().empty()); |
313 DCHECK(container->GetChildren().empty()); | |
314 } | 313 } |
315 #endif | 314 #endif |
316 } | 315 } |
317 | 316 |
318 void Shell::OnCastingSessionStartedOrStopped(bool started) { | 317 void Shell::OnCastingSessionStartedOrStopped(bool started) { |
319 for (auto& observer : shell_observers_) | 318 for (auto& observer : shell_observers_) |
320 observer.OnCastingSessionStartedOrStopped(started); | 319 observer.OnCastingSessionStartedOrStopped(started); |
321 } | 320 } |
322 | 321 |
323 void Shell::OnRootWindowAdded(WmWindow* root_window) { | 322 void Shell::OnRootWindowAdded(WmWindow* root_window) { |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 void Shell::OnWindowActivated( | 1025 void Shell::OnWindowActivated( |
1027 aura::client::ActivationChangeObserver::ActivationReason reason, | 1026 aura::client::ActivationChangeObserver::ActivationReason reason, |
1028 aura::Window* gained_active, | 1027 aura::Window* gained_active, |
1029 aura::Window* lost_active) { | 1028 aura::Window* lost_active) { |
1030 WmWindow* gained_active_wm = WmWindow::Get(gained_active); | 1029 WmWindow* gained_active_wm = WmWindow::Get(gained_active); |
1031 if (gained_active_wm) | 1030 if (gained_active_wm) |
1032 root_window_for_new_windows_ = gained_active_wm->GetRootWindow(); | 1031 root_window_for_new_windows_ = gained_active_wm->GetRootWindow(); |
1033 } | 1032 } |
1034 | 1033 |
1035 } // namespace ash | 1034 } // namespace ash |
OLD | NEW |