Chromium Code Reviews| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 | 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 | 68 // by home/end key) should be enabled. Should only be called from the browser |
| 69 // process. | 69 // process. |
| 70 static bool ScrollAnimationsEnabledBySystem(); | 70 static bool ScrollAnimationsEnabledBySystem(); |
| 71 | 71 |
| 72 class AnimationTestApi; | |
|
sky
2017/07/12 19:16:19
Make this a top-level class (not inside Animation)
newcomer
2017/07/13 21:19:28
Done.
| |
| 73 | |
| 72 protected: | 74 protected: |
| 73 // Invoked from Start to allow subclasses to prepare for the animation. | 75 // Invoked from Start to allow subclasses to prepare for the animation. |
| 74 virtual void AnimationStarted() {} | 76 virtual void AnimationStarted() {} |
| 75 | 77 |
| 76 // Invoked from Stop after we're removed from the container but before the | 78 // Invoked from Stop after we're removed from the container but before the |
| 77 // delegate has been invoked. | 79 // delegate has been invoked. |
| 78 virtual void AnimationStopped() {} | 80 virtual void AnimationStopped() {} |
| 79 | 81 |
| 80 // Invoked from stop to determine if cancel should be invoked. If this returns | 82 // Invoked from stop to determine if cancel should be invoked. If this returns |
| 81 // true the delegate is notified the animation was canceled, otherwise the | 83 // true the delegate is notified the animation was canceled, otherwise the |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 106 | 108 |
| 107 // Time we started at. | 109 // Time we started at. |
| 108 base::TimeTicks start_time_; | 110 base::TimeTicks start_time_; |
| 109 | 111 |
| 110 DISALLOW_COPY_AND_ASSIGN(Animation); | 112 DISALLOW_COPY_AND_ASSIGN(Animation); |
| 111 }; | 113 }; |
| 112 | 114 |
| 113 } // namespace gfx | 115 } // namespace gfx |
| 114 | 116 |
| 115 #endif // UI_GFX_ANIMATION_ANIMATION_H_ | 117 #endif // UI_GFX_ANIMATION_ANIMATION_H_ |
| OLD | NEW |