Chromium Code Reviews| 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_; } |