| 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 | 9 |
| 10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 iter != controllers.end(); ++iter) | 736 iter != controllers.end(); ++iter) |
| 737 (*iter)->UpdateAfterLoginStatusChange(status); | 737 (*iter)->UpdateAfterLoginStatusChange(status); |
| 738 } | 738 } |
| 739 | 739 |
| 740 void Shell::OnAppTerminating() { | 740 void Shell::OnAppTerminating() { |
| 741 FOR_EACH_OBSERVER(ShellObserver, observers_, OnAppTerminating()); | 741 FOR_EACH_OBSERVER(ShellObserver, observers_, OnAppTerminating()); |
| 742 } | 742 } |
| 743 | 743 |
| 744 void Shell::OnLockStateChanged(bool locked) { | 744 void Shell::OnLockStateChanged(bool locked) { |
| 745 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked)); | 745 FOR_EACH_OBSERVER(ShellObserver, observers_, OnLockStateChanged(locked)); |
| 746 #ifndef NDEBUG |
| 747 // Make sure that there is no system modal in Lock layer when unlocked. |
| 748 if (!locked) { |
| 749 std::vector<aura::Window*> containers = GetContainersFromAllRootWindows( |
| 750 internal::kShellWindowId_LockSystemModalContainer, |
| 751 GetPrimaryRootWindow()); |
| 752 for (std::vector<aura::Window*>::const_iterator iter = containers.begin(); |
| 753 iter != containers.end(); ++iter) { |
| 754 DCHECK_EQ(0u, (*iter)->children().size()); |
| 755 } |
| 756 } |
| 757 #endif |
| 746 } | 758 } |
| 747 | 759 |
| 748 void Shell::CreateLauncher() { | 760 void Shell::CreateLauncher() { |
| 749 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 761 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
| 750 for (RootWindowControllerList::iterator iter = controllers.begin(); | 762 for (RootWindowControllerList::iterator iter = controllers.begin(); |
| 751 iter != controllers.end(); ++iter) | 763 iter != controllers.end(); ++iter) |
| 752 (*iter)->shelf()->CreateLauncher(); | 764 (*iter)->shelf()->CreateLauncher(); |
| 753 } | 765 } |
| 754 | 766 |
| 755 void Shell::ShowLauncher() { | 767 void Shell::ShowLauncher() { |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 //////////////////////////////////////////////////////////////////////////////// | 978 //////////////////////////////////////////////////////////////////////////////// |
| 967 // Shell, aura::client::ActivationChangeObserver implementation: | 979 // Shell, aura::client::ActivationChangeObserver implementation: |
| 968 | 980 |
| 969 void Shell::OnWindowActivated(aura::Window* gained_active, | 981 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 970 aura::Window* lost_active) { | 982 aura::Window* lost_active) { |
| 971 if (gained_active) | 983 if (gained_active) |
| 972 target_root_window_ = gained_active->GetRootWindow(); | 984 target_root_window_ = gained_active->GetRootWindow(); |
| 973 } | 985 } |
| 974 | 986 |
| 975 } // namespace ash | 987 } // namespace ash |
| OLD | NEW |