OLD | NEW |
---|---|
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_VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ | 5 #ifndef UI_VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ |
6 #define UI_VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ | 6 #define UI_VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 bool IsAnimating() const; | 88 bool IsAnimating() const; |
89 | 89 |
90 // Cancels all animations, leaving the views at their current location and | 90 // Cancels all animations, leaving the views at their current location and |
91 // size. Any views marked for deletion are deleted. | 91 // size. Any views marked for deletion are deleted. |
92 void Cancel(); | 92 void Cancel(); |
93 | 93 |
94 // Overrides default animation duration. |duration_ms| is the new duration in | 94 // Overrides default animation duration. |duration_ms| is the new duration in |
95 // milliseconds. | 95 // milliseconds. |
96 void SetAnimationDuration(int duration_ms); | 96 void SetAnimationDuration(int duration_ms); |
97 | 97 |
98 // Gets the currently used animation duration. | |
99 int GetAnimationDuration() { return animation_duration_ms_; } | |
sky
2014/01/27 17:17:09
animation_duration_ms() const.
Mr4D (OOO till 08-26)
2014/01/27 18:44:18
Done.
| |
100 | |
98 // Sets the tween type for new animations. Default is EASE_OUT. | 101 // Sets the tween type for new animations. Default is EASE_OUT. |
99 void set_tween_type(gfx::Tween::Type type) { tween_type_ = type; } | 102 void set_tween_type(gfx::Tween::Type type) { tween_type_ = type; } |
100 | 103 |
101 void AddObserver(BoundsAnimatorObserver* observer); | 104 void AddObserver(BoundsAnimatorObserver* observer); |
102 void RemoveObserver(BoundsAnimatorObserver* observer); | 105 void RemoveObserver(BoundsAnimatorObserver* observer); |
103 | 106 |
104 protected: | 107 protected: |
105 // Creates the animation to use for animating views. | 108 // Creates the animation to use for animating views. |
106 virtual gfx::SlideAnimation* CreateAnimation(); | 109 virtual gfx::SlideAnimation* CreateAnimation(); |
107 | 110 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
190 int animation_duration_ms_; | 193 int animation_duration_ms_; |
191 | 194 |
192 gfx::Tween::Type tween_type_; | 195 gfx::Tween::Type tween_type_; |
193 | 196 |
194 DISALLOW_COPY_AND_ASSIGN(BoundsAnimator); | 197 DISALLOW_COPY_AND_ASSIGN(BoundsAnimator); |
195 }; | 198 }; |
196 | 199 |
197 } // namespace views | 200 } // namespace views |
198 | 201 |
199 #endif // UI_VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ | 202 #endif // UI_VIEWS_ANIMATION_BOUNDS_ANIMATOR_H_ |
OLD | NEW |