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

Unified Diff: ui/aura/desktop.cc

Issue 8395046: Allows observers to be notified when layer animations complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge with master Created 9 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: ui/aura/desktop.cc
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index 2c747d28beb72b28eb1182e205bcfd9f37ff51e2..507e7c8575dac081ca3a88fe8eaaf6b2123fb568 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -305,8 +305,10 @@ bool Desktop::DispatchKeyEvent(KeyEvent* event) {
if (degrees != 0) {
layer()->GetAnimator()->set_preemption_strategy(
ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- layer()->GetAnimator()->ScheduleAnimationElement(
- new ScreenRotation(degrees));
+ scoped_ptr<ui::LayerAnimationSequence> screen_rotation(
+ new ui::LayerAnimationSequence(new ScreenRotation(degrees)));
+ screen_rotation->AddObserver(this);
+ layer()->GetAnimator()->ScheduleAnimation(screen_rotation.release());
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698