| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BASE_ANIMATION_LINEAR_ANIMATION_H_ | 5 #ifndef UI_BASE_ANIMATION_LINEAR_ANIMATION_H_ |
| 6 #define UI_BASE_ANIMATION_LINEAR_ANIMATION_H_ | 6 #define UI_BASE_ANIMATION_LINEAR_ANIMATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "ui/base/animation/animation.h" | 10 #include "ui/base/animation/animation.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 | 13 |
| 14 class AnimationDelegate; | 14 class AnimationDelegate; |
| 15 | 15 |
| 16 // Linear time bounded animation. As the animation progresses AnimateToState is | 16 // Linear time bounded animation. As the animation progresses AnimateToState is |
| 17 // invoked. | 17 // invoked. |
| 18 class UI_API LinearAnimation : public Animation { | 18 class UI_EXPORT LinearAnimation : public Animation { |
| 19 public: | 19 public: |
| 20 // Initializes everything except the duration. | 20 // Initializes everything except the duration. |
| 21 // | 21 // |
| 22 // Caller must make sure to call SetDuration() if they use this | 22 // Caller must make sure to call SetDuration() if they use this |
| 23 // constructor; it is preferable to use the full one, but sometimes | 23 // constructor; it is preferable to use the full one, but sometimes |
| 24 // duration can change between calls to Start() and we need to | 24 // duration can change between calls to Start() and we need to |
| 25 // expose this interface. | 25 // expose this interface. |
| 26 LinearAnimation(int frame_rate, AnimationDelegate* delegate); | 26 LinearAnimation(int frame_rate, AnimationDelegate* delegate); |
| 27 | 27 |
| 28 // Initializes all fields. | 28 // Initializes all fields. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // If true, we're in end. This is used to determine if the animation should | 65 // If true, we're in end. This is used to determine if the animation should |
| 66 // be advanced to the end from AnimationStopped. | 66 // be advanced to the end from AnimationStopped. |
| 67 bool in_end_; | 67 bool in_end_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(LinearAnimation); | 69 DISALLOW_COPY_AND_ASSIGN(LinearAnimation); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace ui | 72 } // namespace ui |
| 73 | 73 |
| 74 #endif // APP_LINEAR_ANIMATION_H_ | 74 #endif // APP_LINEAR_ANIMATION_H_ |
| OLD | NEW |