Chromium Code Reviews| Index: ash/shell.cc |
| diff --git a/ash/shell.cc b/ash/shell.cc |
| index 1d7e60c4a670b5cf3c448d3b68712a16eb687cd9..96c52acff7c1d6a9357025dc3263025aeb0995b1 100644 |
| --- a/ash/shell.cc |
| +++ b/ash/shell.cc |
| @@ -333,20 +333,6 @@ void Shell::OnAppTerminating() { |
| observer.OnAppTerminating(); |
| } |
| -void Shell::OnLockStateChanged(bool locked) { |
| - for (auto& observer : shell_observers_) |
| - observer.OnLockStateChanged(locked); |
| -#ifndef NDEBUG |
| - // Make sure that there is no system modal in Lock layer when unlocked. |
| - if (!locked) { |
| - aura::Window::Windows containers = wm::GetContainersFromAllRootWindows( |
| - kShellWindowId_LockSystemModalContainer, GetPrimaryRootWindow()); |
| - for (aura::Window* container : containers) |
| - DCHECK(container->children().empty()); |
| - } |
| -#endif |
| -} |
| - |
| void Shell::OnCastingSessionStartedOrStopped(bool started) { |
| for (auto& observer : shell_observers_) |
| observer.OnCastingSessionStartedOrStopped(started); |
| @@ -1251,6 +1237,20 @@ void Shell::LoginStatusChanged(LoginStatus login_status) { |
| observer.OnLoginStateChanged(login_status); |
| } |
| +void Shell::OnLockStateChanged(bool locked) { |
| + for (auto& observer : shell_observers_) |
| + observer.OnLockStateChanged(locked); |
|
James Cook
2017/04/07 20:26:55
Aside: It's unfortunate that we have Shell observe
xiyuan
2017/04/07 21:50:01
SGTM. Added a TODO. I have thought about doing tha
|
| +#ifndef NDEBUG |
| + // Make sure that there is no system modal in Lock layer when unlocked. |
| + if (!locked) { |
| + aura::Window::Windows containers = wm::GetContainersFromAllRootWindows( |
| + kShellWindowId_LockSystemModalContainer, GetPrimaryRootWindow()); |
| + for (aura::Window* container : containers) |
| + DCHECK(container->children().empty()); |
| + } |
| +#endif |
| +} |
| + |
| void Shell::OnPrefServiceInitialized( |
| std::unique_ptr<::PrefService> pref_service) { |
| if (!instance_) |