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

Unified Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 11276025: Add lock pod animation on unlock. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add comment Created 8 years, 2 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: chrome/browser/chromeos/login/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index f2be07bc1818f7a3409762c308a22ffbdbb329f1..19d94c2cce51d9854a8b9a3d4c628d7f3f06402f 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -9,6 +9,7 @@
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/shell.h"
+#include "ash/wm/session_state_controller.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
@@ -306,8 +307,20 @@ void ScreenLocker::Hide() {
}
DCHECK(screen_locker_);
+ base::Callback<void(void)> callback =
+ base::Bind(&ScreenLocker::ScheduleDeletion);
+ ash::Shell::GetInstance()->session_state_controller()->
+ OnLockScreenHide(callback);
+}
+
+void ScreenLocker::ScheduleDeletion() {
+ // Avoid possible multiple calls.
+ if (NULL == screen_locker_)
Daniel Erat 2012/10/25 15:45:58 nit: use "screen_locker_ != NULL" instead (it's ea
+ return;
VLOG(1) << "Posting task to delete ScreenLocker " << screen_locker_;
- MessageLoopForUI::current()->DeleteSoon(FROM_HERE, screen_locker_);
+ ScreenLocker* screen_locker = screen_locker_;
+ screen_locker_ = NULL;
+ MessageLoopForUI::current()->DeleteSoon(FROM_HERE, screen_locker);
}
// static
« ash/wm/session_state_controller_impl2.cc ('K') | « chrome/browser/chromeos/login/screen_locker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698