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

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: Make it compile 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..03cc0949ed6dac413cc1e1eb110ac7da08e8b398 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() {
Nikita (slow) 2012/10/26 10:37:46 nit: // static
+ // Avoid possible multiple calls.
+ if (screen_locker_ == NULL)
+ 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_animator.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