| 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_GFX_ANIMATION_LINEAR_ANIMATION_H_ | 5 #ifndef UI_GFX_ANIMATION_LINEAR_ANIMATION_H_ |
| 6 #define UI_GFX_ANIMATION_LINEAR_ANIMATION_H_ | 6 #define UI_GFX_ANIMATION_LINEAR_ANIMATION_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "ui/gfx/animation/animation.h" | 10 #include "ui/gfx/animation/animation.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 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 GFX_EXPORT LinearAnimation : public Animation { | 18 class ANIMATION_EXPORT LinearAnimation : public Animation { |
| 19 public: | 19 public: |
| 20 // Default frame rate (hz). | 20 // Default frame rate (hz). |
| 21 static const int kDefaultFrameRate = 60; | 21 static const int kDefaultFrameRate = 60; |
| 22 | 22 |
| 23 // Initializes everything except the duration. | 23 // Initializes everything except the duration. |
| 24 // | 24 // |
| 25 // Caller must make sure to call SetDuration() if they use this | 25 // Caller must make sure to call SetDuration() if they use this |
| 26 // constructor; it is preferable to use the full one, but sometimes | 26 // constructor; it is preferable to use the full one, but sometimes |
| 27 // duration can change between calls to Start() and we need to | 27 // duration can change between calls to Start() and we need to |
| 28 // expose this interface. | 28 // expose this interface. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // If true, we're in end. This is used to determine if the animation should | 75 // If true, we're in end. This is used to determine if the animation should |
| 76 // be advanced to the end from AnimationStopped. | 76 // be advanced to the end from AnimationStopped. |
| 77 bool in_end_; | 77 bool in_end_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(LinearAnimation); | 79 DISALLOW_COPY_AND_ASSIGN(LinearAnimation); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace gfx | 82 } // namespace gfx |
| 83 | 83 |
| 84 #endif // APP_LINEAR_ANIMATION_H_ | 84 #endif // APP_LINEAR_ANIMATION_H_ |
| OLD | NEW |