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

Unified Diff: ash/shell.cc

Issue 2801333002: mash: Run pre-unlock animation via SessionController (Closed)
Patch Set: rebase 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
« no previous file with comments | « ash/shell.h ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index f4eb46e63f7a49b255fbc7cf1669a30511118fa6..ee4505223fd1d77e9cb0159b45defcadcf791c14 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);
@@ -1249,6 +1235,22 @@ void Shell::LoginStatusChanged(LoginStatus login_status) {
observer.OnLoginStateChanged(login_status);
}
+void Shell::LockStateChanged(bool locked) {
+ // TODO(xiyuan): Convert OnLockStateChanged() ShellObservers to
+ // SessionStateObservers.
+ 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::OnPrefServiceInitialized(
std::unique_ptr<::PrefService> pref_service) {
if (!instance_)
« no previous file with comments | « ash/shell.h ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698