| OLD | NEW |
| 1 // Copyright (c) 2010 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 APP_ANIMATION_H_ | 5 #ifndef UI_BASE_ANIMATION_ANIMATION_H_ |
| 6 #define APP_ANIMATION_H_ | 6 #define UI_BASE_ANIMATION_ANIMATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "app/animation_container_element.h" | |
| 10 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 11 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "ui/base/animation/animation_container_element.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class Rect; | 14 class Rect; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ui { |
| 18 |
| 17 class AnimationContainer; | 19 class AnimationContainer; |
| 18 class AnimationDelegate; | 20 class AnimationDelegate; |
| 19 | 21 |
| 20 // Base class used in implementing animations. You only need use this class if | 22 // Base class used in implementing animations. You only need use this class if |
| 21 // you're implementing a new animation type, otherwise you'll likely want one of | 23 // you're implementing a new animation type, otherwise you'll likely want one of |
| 22 // LinearAnimation, SlideAnimation, ThrobAnimation or MultiAnimation. | 24 // LinearAnimation, SlideAnimation, ThrobAnimation or MultiAnimation. |
| 23 // | 25 // |
| 24 // To subclass override Step, which is invoked as the animation progresses and | 26 // To subclass override Step, which is invoked as the animation progresses and |
| 25 // GetCurrentValue() to return the value appropriate to the animation. | 27 // GetCurrentValue() to return the value appropriate to the animation. |
| 26 class Animation : public AnimationContainerElement { | 28 class Animation : public AnimationContainerElement { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 97 |
| 96 // Container we're in. If non-null we're animating. | 98 // Container we're in. If non-null we're animating. |
| 97 scoped_refptr<AnimationContainer> container_; | 99 scoped_refptr<AnimationContainer> container_; |
| 98 | 100 |
| 99 // Time we started at. | 101 // Time we started at. |
| 100 base::TimeTicks start_time_; | 102 base::TimeTicks start_time_; |
| 101 | 103 |
| 102 DISALLOW_COPY_AND_ASSIGN(Animation); | 104 DISALLOW_COPY_AND_ASSIGN(Animation); |
| 103 }; | 105 }; |
| 104 | 106 |
| 105 #endif // APP_ANIMATION_H_ | 107 } // namespace ui |
| 108 |
| 109 #endif // UI_BASE_ANIMATION_ANIMATION_H_ |
| OLD | NEW |