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

Side by Side Diff: cc/animation/scrollbar_animation_controller.h

Issue 23978008: Suppress scrollbar animation if the scroll gesture does not scroll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayerTreeHostImpl unit tests Created 7 years, 3 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
« no previous file with comments | « no previous file | cc/animation/scrollbar_animation_controller_linear_fade.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_ 5 #ifndef CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_
6 #define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_ 6 #define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "ui/gfx/vector2d_f.h" 10 #include "ui/gfx/vector2d_f.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 // This abstract class represents the compositor-side analogy of 14 // This abstract class represents the compositor-side analogy of
15 // ScrollbarAnimator. Individual platforms should subclass it to provide 15 // ScrollbarAnimator. Individual platforms should subclass it to provide
16 // specialized implementation. 16 // specialized implementation.
17 class CC_EXPORT ScrollbarAnimationController { 17 class CC_EXPORT ScrollbarAnimationController {
18 public: 18 public:
19 virtual ~ScrollbarAnimationController() {} 19 virtual ~ScrollbarAnimationController() {}
20 20
21 virtual bool IsScrollGestureInProgress() const = 0;
22 virtual bool IsAnimating() const = 0; 21 virtual bool IsAnimating() const = 0;
23 virtual base::TimeDelta DelayBeforeStart(base::TimeTicks now) const = 0; 22 virtual base::TimeDelta DelayBeforeStart(base::TimeTicks now) const = 0;
24 23
25 virtual bool Animate(base::TimeTicks now) = 0; 24 virtual bool Animate(base::TimeTicks now) = 0;
26 virtual void DidScrollGestureBegin() = 0; 25 virtual void DidScrollGestureBegin() = 0;
27 virtual void DidScrollGestureEnd(base::TimeTicks now) = 0; 26 virtual void DidScrollGestureEnd(base::TimeTicks now) = 0;
28 virtual void DidProgrammaticallyUpdateScroll(base::TimeTicks now) = 0; 27 virtual void DidScrollUpdate(base::TimeTicks now) = 0;
29 }; 28 };
30 29
31 } // namespace cc 30 } // namespace cc
32 31
33 #endif // CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_ 32 #endif // CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/animation/scrollbar_animation_controller_linear_fade.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698