IndexedDB: fsync after transactions.
[chromium-blink-merge.git] / cc / animation / scrollbar_animation_controller.h
blobecef4fb2d9728cec7789c4336524a7d76f0a731c
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
3 // found in the LICENSE file.
5 #ifndef CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_
6 #define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_
8 #include "base/time/time.h"
9 #include "cc/base/cc_export.h"
10 #include "ui/gfx/vector2d_f.h"
12 namespace cc {
14 // This abstract class represents the compositor-side analogy of
15 // ScrollbarAnimator. Individual platforms should subclass it to provide
16 // specialized implementation.
17 class CC_EXPORT ScrollbarAnimationController {
18 public:
19 virtual ~ScrollbarAnimationController() {}
21 virtual bool IsAnimating() const = 0;
22 virtual base::TimeDelta DelayBeforeStart(base::TimeTicks now) const = 0;
24 virtual bool Animate(base::TimeTicks now) = 0;
25 virtual void DidScrollGestureBegin() = 0;
26 virtual void DidScrollGestureEnd(base::TimeTicks now) = 0;
27 virtual void DidMouseMoveOffScrollbar(base::TimeTicks now) = 0;
29 // Returns true if we should start an animation.
30 virtual bool DidScrollUpdate(base::TimeTicks now) = 0;
31 virtual bool DidMouseMoveNear(base::TimeTicks now, float distance) = 0;
34 } // namespace cc
36 #endif // CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_