Chromium Code Reviews| 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 // Make sure that there is no system modal in Lock layer when unlocked. | |
| 747 if (!locked) { | |
| 748 std::vector<aura::Window*> containers = GetContainersFromAllRootWindows( | |
| 749 internal::kShellWindowId_LockSystemModalContainer, | |
| 750 GetPrimaryRootWindow()); | |
| 751 for (std::vector<aura::Window*>::const_iterator iter = containers.begin(); | |
| 752 iter != containers.end(); ++iter) { | |
| 753 DCHECK_EQ(0u, (*iter)->children().size()); | |
|
James Cook
2013/08/09 19:08:03
Do you want DCHECK or CHECK here? Are you trying
| |
| 754 } | |
| 755 } | |
| 746 } | 756 } |
| 747 | 757 |
| 748 void Shell::CreateLauncher() { | 758 void Shell::CreateLauncher() { |
| 749 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 759 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
| 750 for (RootWindowControllerList::iterator iter = controllers.begin(); | 760 for (RootWindowControllerList::iterator iter = controllers.begin(); |
| 751 iter != controllers.end(); ++iter) | 761 iter != controllers.end(); ++iter) |
| 752 (*iter)->shelf()->CreateLauncher(); | 762 (*iter)->shelf()->CreateLauncher(); |
| 753 } | 763 } |
| 754 | 764 |
| 755 void Shell::ShowLauncher() { | 765 void Shell::ShowLauncher() { |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 966 //////////////////////////////////////////////////////////////////////////////// | 976 //////////////////////////////////////////////////////////////////////////////// |
| 967 // Shell, aura::client::ActivationChangeObserver implementation: | 977 // Shell, aura::client::ActivationChangeObserver implementation: |
| 968 | 978 |
| 969 void Shell::OnWindowActivated(aura::Window* gained_active, | 979 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 970 aura::Window* lost_active) { | 980 aura::Window* lost_active) { |
| 971 if (gained_active) | 981 if (gained_active) |
| 972 target_root_window_ = gained_active->GetRootWindow(); | 982 target_root_window_ = gained_active->GetRootWindow(); |
| 973 } | 983 } |
| 974 | 984 |
| 975 } // namespace ash | 985 } // namespace ash |
| OLD | NEW |