Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: ui/gfx/animation/animation.h

Issue 1653003002: Make scrollAnimatorEnabled work on Mac like it does on other platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698