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

Unified Diff: ui/gfx/animation/slide_animation.h

Issue 2679333002: [ash-md] Remove the number of animators used for the Shelf animations. (Closed)
Patch Set: Created 3 years, 10 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/gfx/animation/slide_animation.h
diff --git a/ui/gfx/animation/slide_animation.h b/ui/gfx/animation/slide_animation.h
index 9023d40c86f3de320cdc089d497347af363421fd..1fbf1c5e196308fbb26ad883bafb613eccdfbf7b 100644
--- a/ui/gfx/animation/slide_animation.h
+++ b/ui/gfx/animation/slide_animation.h
@@ -57,9 +57,15 @@ class GFX_EXPORT SlideAnimation : public LinearAnimation {
// Begin a showing animation or reverse a hiding animation in progress.
virtual void Show();
+ // Synchronously completes the show animation.
+ void ShowImmediately();
sky 2017/02/08 03:02:56 Can you motivate why you want these? I would prefe
bruthig 2017/02/10 18:49:10 Done.
+
// Begin a hiding animation or reverse a showing animation in progress.
virtual void Hide();
+ // Synchronously completes the hide animation.
+ void HideImmediately();
+
// Sets the time a slide will take. Note that this isn't actually
// the amount of time an animation will take as the current value of
// the slide is considered.
@@ -68,6 +74,10 @@ class GFX_EXPORT SlideAnimation : public LinearAnimation {
void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; }
double GetCurrentValue() const override;
+ // TODO(bruthig): Fix IsShowing() and IsClosing() to be consistent. e.g.
+ // IsShowing() will currently return true after the 'show' animation has been
+ // completed however IsClosing() will return false after the 'hide' animation
+ // has been completed.
bool IsShowing() const { return showing_; }
bool IsClosing() const { return !showing_ && value_end_ < value_current_; }

Powered by Google App Engine
This is Rietveld 408576698