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

Side by Side Diff: ui/gfx/animation/slide_animation.h

Issue 2679333002: [ash-md] Remove the number of animators used for the Shelf animations. (Closed)
Patch Set: Addressed comments from patch set 4. 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 unified diff | Download patch
« no previous file with comments | « ash/common/wm/dock/docked_window_layout_manager.cc ('k') | ui/gfx/animation/slide_animation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_ANIMATION_SLIDE_ANIMATION_H_ 5 #ifndef UI_GFX_ANIMATION_SLIDE_ANIMATION_H_
6 #define UI_GFX_ANIMATION_SLIDE_ANIMATION_H_ 6 #define UI_GFX_ANIMATION_SLIDE_ANIMATION_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/animation/linear_animation.h" 9 #include "ui/gfx/animation/linear_animation.h"
10 #include "ui/gfx/animation/tween.h" 10 #include "ui/gfx/animation/tween.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual void Hide(); 61 virtual void Hide();
62 62
63 // Sets the time a slide will take. Note that this isn't actually 63 // Sets the time a slide will take. Note that this isn't actually
64 // the amount of time an animation will take as the current value of 64 // the amount of time an animation will take as the current value of
65 // the slide is considered. 65 // the slide is considered.
66 virtual void SetSlideDuration(int duration); 66 virtual void SetSlideDuration(int duration);
67 int GetSlideDuration() const { return slide_duration_; } 67 int GetSlideDuration() const { return slide_duration_; }
68 void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; } 68 void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; }
69 69
70 double GetCurrentValue() const override; 70 double GetCurrentValue() const override;
71 // TODO(bruthig): Fix IsShowing() and IsClosing() to be consistent. e.g.
72 // IsShowing() will currently return true after the 'show' animation has been
73 // completed however IsClosing() will return false after the 'hide' animation
74 // has been completed.
71 bool IsShowing() const { return showing_; } 75 bool IsShowing() const { return showing_; }
72 bool IsClosing() const { return !showing_ && value_end_ < value_current_; } 76 bool IsClosing() const { return !showing_ && value_end_ < value_current_; }
73 77
74 class TestApi; 78 class TestApi;
75 79
76 private: 80 private:
77 // Overridden from Animation. 81 // Overridden from Animation.
78 void AnimateToState(double state) override; 82 void AnimateToState(double state) override;
79 83
80 AnimationDelegate* target_; 84 AnimationDelegate* target_;
(...skipping 12 matching lines...) Expand all
93 // How long a hover in/out animation will last for. This defaults to 97 // How long a hover in/out animation will last for. This defaults to
94 // kHoverFadeDurationMS, but can be overridden with SetDuration. 98 // kHoverFadeDurationMS, but can be overridden with SetDuration.
95 int slide_duration_; 99 int slide_duration_;
96 100
97 DISALLOW_COPY_AND_ASSIGN(SlideAnimation); 101 DISALLOW_COPY_AND_ASSIGN(SlideAnimation);
98 }; 102 };
99 103
100 } // namespace gfx 104 } // namespace gfx
101 105
102 #endif // UI_GFX_ANIMATION_SLIDE_ANIMATION_H_ 106 #endif // UI_GFX_ANIMATION_SLIDE_ANIMATION_H_
OLDNEW
« no previous file with comments | « ash/common/wm/dock/docked_window_layout_manager.cc ('k') | ui/gfx/animation/slide_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698