summaryrefslogtreecommitdiff
path: root/chromium/cc/animation/scrollbar_animation_controller.h
blob: 55d2945768950e5ba9ab73dba84ac54bbf786f33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_
#define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_

#include "base/time/time.h"
#include "cc/base/cc_export.h"
#include "ui/gfx/vector2d_f.h"

namespace cc {

// This abstract class represents the compositor-side analogy of
// ScrollbarAnimator.  Individual platforms should subclass it to provide
// specialized implementation.
class CC_EXPORT ScrollbarAnimationController {
 public:
  virtual ~ScrollbarAnimationController() {}

  virtual bool IsScrollGestureInProgress() const = 0;
  virtual bool IsAnimating() const = 0;
  virtual base::TimeDelta DelayBeforeStart(base::TimeTicks now) const = 0;

  virtual bool Animate(base::TimeTicks now) = 0;
  virtual void DidScrollGestureBegin() = 0;
  virtual void DidScrollGestureEnd(base::TimeTicks now) = 0;
  virtual void DidProgrammaticallyUpdateScroll(base::TimeTicks now) = 0;
};

}  // namespace cc

#endif  // CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_H_