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

Unified Diff: ash/wm/lock_state_controller.h

Issue 326813004: Added quick lock mechanism while in Touchview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ASH_EXPORT to SessionStateAnimator Created 6 years, 3 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/test/test_session_state_animator.cc ('k') | ash/wm/lock_state_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/lock_state_controller.h
diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h
index b6d134f9e7d9147e139c5ec21cbb425f716016a9..ca166882555e514e4c42367d32aa0e33a9ee05fe 100644
--- a/ash/wm/lock_state_controller.h
+++ b/ash/wm/lock_state_controller.h
@@ -52,8 +52,8 @@ class ASH_EXPORT LockStateControllerDelegate {
// Entry points:
// * StartLockAnimation (bool shutdown after lock) - starts lock that can be
// cancelled.
-// * StartLockAnimationAndLockImmediately - starts uninterruptible lock
-// animation.
+// * StartLockAnimationAndLockImmediately (bool shutdown after lock) - starts
+// uninterruptible lock animation.
// This leads to call of either StartImmediatePreLockAnimation or
// StartCancellablePreLockAnimation. Once they complete
// PreLockAnimationFinished is called, and system lock is requested.
@@ -135,6 +135,7 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
controller_->OnRealShutdownTimeout();
controller_->real_shutdown_timer_.Stop();
}
+
private:
LockStateController* controller_; // not owned
@@ -144,8 +145,7 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
LockStateController();
virtual ~LockStateController();
- // Takes ownership of |delegate|.
- void SetDelegate(LockStateControllerDelegate* delegate);
+ void SetDelegate(scoped_ptr<LockStateControllerDelegate> delegate);
void AddObserver(LockStateObserver* observer);
void RemoveObserver(LockStateObserver* observer);
@@ -160,9 +160,10 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
// Starts shutting down (with slow animation) that can be cancelled.
void StartShutdownAnimation();
- // Starts usual lock animation, but locks immediately.
- // Unlike StartLockAnimation it does no lead to StartShutdownAnimation.
- void StartLockAnimationAndLockImmediately();
+ // Starts usual lock animation, but locks immediately. After locking and
+ // |kLockToShutdownTimeoutMs| StartShutdownAnimation() will be called unless
+ // CancelShutdownAnimation() is called, if |shutdown_after_lock| is true.
+ void StartLockAnimationAndLockImmediately(bool shutdown_after_lock);
// Returns true if we have requested system to lock, but haven't received
// confirmation yet.
@@ -206,6 +207,10 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
virtual void OnAppTerminating() OVERRIDE;
virtual void OnLockStateChanged(bool locked) OVERRIDE;
+ void set_animator_for_test(SessionStateAnimator* animator) {
+ animator_.reset(animator);
+ }
+
private:
friend class test::PowerButtonControllerTest;
friend class test::LockStateControllerTest;
@@ -266,12 +271,12 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver,
// Fades in background layer with |speed| if it was hidden in unlocked state.
void AnimateBackgroundAppearanceIfNecessary(
ash::SessionStateAnimator::AnimationSpeed speed,
- ui::LayerAnimationObserver* observer);
+ SessionStateAnimator::AnimationSequence* animation_sequence);
// Fades out background layer with |speed| if it was hidden in unlocked state.
void AnimateBackgroundHidingIfNecessary(
ash::SessionStateAnimator::AnimationSpeed speed,
- ui::LayerAnimationObserver* observer);
+ SessionStateAnimator::AnimationSequence* animation_sequence);
scoped_ptr<SessionStateAnimator> animator_;
« no previous file with comments | « ash/test/test_session_state_animator.cc ('k') | ash/wm/lock_state_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698