| 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 (e.g. produced |
| 68 // by home/end key) should be enabled. Should only be called from the browser |
| 69 // process. |
| 70 static bool ScrollAnimationsEnabledBySystem(); |
| 71 |
| 67 protected: | 72 protected: |
| 68 // Invoked from Start to allow subclasses to prepare for the animation. | 73 // Invoked from Start to allow subclasses to prepare for the animation. |
| 69 virtual void AnimationStarted() {} | 74 virtual void AnimationStarted() {} |
| 70 | 75 |
| 71 // Invoked from Stop after we're removed from the container but before the | 76 // Invoked from Stop after we're removed from the container but before the |
| 72 // delegate has been invoked. | 77 // delegate has been invoked. |
| 73 virtual void AnimationStopped() {} | 78 virtual void AnimationStopped() {} |
| 74 | 79 |
| 75 // Invoked from stop to determine if cancel should be invoked. If this returns | 80 // 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 | 81 // true the delegate is notified the animation was canceled, otherwise the |
| (...skipping 24 matching lines...) Expand all Loading... |
| 101 | 106 |
| 102 // Time we started at. | 107 // Time we started at. |
| 103 base::TimeTicks start_time_; | 108 base::TimeTicks start_time_; |
| 104 | 109 |
| 105 DISALLOW_COPY_AND_ASSIGN(Animation); | 110 DISALLOW_COPY_AND_ASSIGN(Animation); |
| 106 }; | 111 }; |
| 107 | 112 |
| 108 } // namespace gfx | 113 } // namespace gfx |
| 109 | 114 |
| 110 #endif // UI_GFX_ANIMATION_ANIMATION_H_ | 115 #endif // UI_GFX_ANIMATION_ANIMATION_H_ |
| OLD | NEW |