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

Unified Diff: cc/scrollbar_animation_controller_linear_fade.h

Issue 12408028: cc: Delay start of scrollbar animation setNeedsRedraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 188682 Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scrollbar_animation_controller.h ('k') | cc/scrollbar_animation_controller_linear_fade.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_animation_controller_linear_fade.h
diff --git a/cc/scrollbar_animation_controller_linear_fade.h b/cc/scrollbar_animation_controller_linear_fade.h
index 709bddedde887625913ac950f88827591bec3387..81dba2576a73ac3ca8f56c61e0429e3411d45db1 100644
--- a/cc/scrollbar_animation_controller_linear_fade.h
+++ b/cc/scrollbar_animation_controller_linear_fade.h
@@ -14,18 +14,22 @@ class LayerImpl;
class CC_EXPORT ScrollbarAnimationControllerLinearFade : public ScrollbarAnimationController {
public:
- static scoped_ptr<ScrollbarAnimationControllerLinearFade> create(LayerImpl* scrollLayer, double fadeoutDelay, double fadeoutLength);
+ static scoped_ptr<ScrollbarAnimationControllerLinearFade> create(LayerImpl* scrollLayer, base::TimeDelta fadeoutDelay, base::TimeDelta fadeoutLength);
virtual ~ScrollbarAnimationControllerLinearFade();
// ScrollbarAnimationController overrides.
+ virtual bool isScrollGestureInProgress() const OVERRIDE;
+ virtual bool isAnimating() const OVERRIDE;
+ virtual base::TimeDelta delayBeforeStart(base::TimeTicks now) const OVERRIDE;
+
virtual bool animate(base::TimeTicks) OVERRIDE;
- virtual void didPinchGestureUpdate(base::TimeTicks) OVERRIDE;
- virtual void didPinchGestureEnd(base::TimeTicks) OVERRIDE;
- virtual void didUpdateScrollOffset(base::TimeTicks) OVERRIDE;
+ virtual void didScrollGestureBegin() OVERRIDE;
+ virtual void didScrollGestureEnd(base::TimeTicks now) OVERRIDE;
+ virtual void didProgrammaticallyUpdateScroll(base::TimeTicks now) OVERRIDE;
protected:
- ScrollbarAnimationControllerLinearFade(LayerImpl* scrollLayer, double fadeoutDelay, double fadeoutLength);
+ ScrollbarAnimationControllerLinearFade(LayerImpl* scrollLayer, base::TimeDelta fadeoutDelay, base::TimeDelta fadeoutLength);
private:
float opacityAtTime(base::TimeTicks);
@@ -33,10 +37,10 @@ private:
LayerImpl* m_scrollLayer;
base::TimeTicks m_lastAwakenTime;
- bool m_pinchGestureInEffect;
+ bool m_scrollGestureInProgress;
- double m_fadeoutDelay;
- double m_fadeoutLength;
+ base::TimeDelta m_fadeoutDelay;
+ base::TimeDelta m_fadeoutLength;
double m_currentTimeForTesting;
};
« no previous file with comments | « cc/scrollbar_animation_controller.h ('k') | cc/scrollbar_animation_controller_linear_fade.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698