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

Unified Diff: app/throb_animation.cc

Issue 1961001: Refactors animation to allow for cleaner subclassing. I'm doing this (Closed)
Patch Set: Incorporated review feedback Created 10 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 | « app/test_animation_delegate.h ('k') | app/tween.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/throb_animation.cc
diff --git a/app/throb_animation.cc b/app/throb_animation.cc
index e8e57303ba899d3d6972d4bf2070e4bf695f5fa2..922d77d4dfb1157eca31446392276aa71f242ae6 100644
--- a/app/throb_animation.cc
+++ b/app/throb_animation.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -18,7 +18,7 @@ void ThrobAnimation::StartThrobbing(int cycles_til_stop) {
cycles_remaining_ = cycles_til_stop;
throbbing_ = true;
SlideAnimation::SetSlideDuration(throb_duration_);
- if (IsAnimating())
+ if (is_animating())
return; // We're already running, we'll cycle when current loop finishes.
if (IsShowing())
@@ -44,9 +44,9 @@ void ThrobAnimation::Hide() {
}
void ThrobAnimation::Step(base::TimeTicks time_now) {
- Animation::Step(time_now);
+ LinearAnimation::Step(time_now);
- if (!IsAnimating() && throbbing_) {
+ if (!is_animating() && throbbing_) {
// Were throbbing a finished a cycle. Start the next cycle unless we're at
// the end of the cycles, in which case we stop.
cycles_remaining_--;
« no previous file with comments | « app/test_animation_delegate.h ('k') | app/tween.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698