Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1152)

Unified Diff: ash/shell.cc

Issue 2801333002: mash: Run pre-unlock animation via SessionController (Closed)
Patch Set: fix compile Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_)

Powered by Google App Engine
This is Rietveld 408576698