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_ANIMATION_H_ | 5 #ifndef UI_GFX_ANIMATION_ANIMATION_H_ |
6 #define UI_GFX_ANIMATION_ANIMATION_H_ | 6 #define UI_GFX_ANIMATION_ANIMATION_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 bool is_animating() const { return is_animating_; } | 58 bool is_animating() const { return is_animating_; } |
59 | 59 |
60 base::TimeDelta timer_interval() const { return timer_interval_; } | 60 base::TimeDelta timer_interval() const { return timer_interval_; } |
61 | 61 |
62 // Returns true if rich animations should be rendered. | 62 // Returns true if rich animations should be rendered. |
63 // Looks at session type (e.g. remote desktop) and accessibility settings | 63 // Looks at session type (e.g. remote desktop) and accessibility settings |
64 // to give guidance for heavy animations such as "start download" arrow. | 64 // to give guidance for heavy animations such as "start download" arrow. |
65 static bool ShouldRenderRichAnimation(); | 65 static bool ShouldRenderRichAnimation(); |
66 | 66 |
| 67 // Determines on a per-platform basis whether scroll animations |
| 68 // (e.g. produced by home/end key) should be enabled. |
| 69 static bool ScrollAnimationsEnabledBySystem(); |
| 70 |
67 protected: | 71 protected: |
68 // Invoked from Start to allow subclasses to prepare for the animation. | 72 // Invoked from Start to allow subclasses to prepare for the animation. |
69 virtual void AnimationStarted() {} | 73 virtual void AnimationStarted() {} |
70 | 74 |
71 // Invoked from Stop after we're removed from the container but before the | 75 // Invoked from Stop after we're removed from the container but before the |
72 // delegate has been invoked. | 76 // delegate has been invoked. |
73 virtual void AnimationStopped() {} | 77 virtual void AnimationStopped() {} |
74 | 78 |
75 // Invoked from stop to determine if cancel should be invoked. If this returns | 79 // Invoked from stop to determine if cancel should be invoked. If this returns |
76 // true the delegate is notified the animation was canceled, otherwise the | 80 // true the delegate is notified the animation was canceled, otherwise the |
(...skipping 24 matching lines...) Expand all Loading... |
101 | 105 |
102 // Time we started at. | 106 // Time we started at. |
103 base::TimeTicks start_time_; | 107 base::TimeTicks start_time_; |
104 | 108 |
105 DISALLOW_COPY_AND_ASSIGN(Animation); | 109 DISALLOW_COPY_AND_ASSIGN(Animation); |
106 }; | 110 }; |
107 | 111 |
108 } // namespace gfx | 112 } // namespace gfx |
109 | 113 |
110 #endif // UI_GFX_ANIMATION_ANIMATION_H_ | 114 #endif // UI_GFX_ANIMATION_ANIMATION_H_ |
OLD | NEW |