OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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. |
| 4 |
| 5 #ifndef CC_INPUT_SCROLL_ELASTICITY_CONTROLLER_H_ |
| 6 #define CC_INPUT_SCROLL_ELASTICITY_CONTROLLER_H_ |
| 7 |
| 8 #include "base/time/time.h" |
| 9 #include "cc/base/cc_export.h" |
| 10 #include "ui/gfx/geometry/vector2d_f.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 class CC_EXPORT ScrollElasticityController { |
| 15 public: |
| 16 virtual void WillShutdown() = 0; |
| 17 virtual void Animate(base::TimeTicks time) = 0; |
| 18 }; |
| 19 |
| 20 class CC_EXPORT ScrollElasticityControllerClient { |
| 21 public: |
| 22 virtual void BindToController(ScrollElasticityController* controller) = 0; |
| 23 |
| 24 virtual bool allowsHorizontalStretching() const = 0; |
| 25 virtual bool allowsVerticalStretching() const = 0; |
| 26 virtual gfx::Vector2dF stretchAmount() const = 0; |
| 27 virtual bool pinnedInDirection(const gfx::Vector2dF& delta) const = 0; |
| 28 virtual bool canScrollHorizontally() const = 0; |
| 29 virtual bool canScrollVertically() const = 0; |
| 30 virtual gfx::Vector2dF absoluteScrollPosition() const = 0; |
| 31 |
| 32 virtual void immediateScrollBy(const gfx::Vector2dF& delta) = 0; |
| 33 virtual void immediateScrollByWithoutContentEdgeConstraints(const gfx::Vector2
dF& delta) = 0; |
| 34 virtual void startSnapRubberbandTimer() = 0; |
| 35 virtual void stopSnapRubberbandTimer() = 0; |
| 36 |
| 37 virtual void adjustScrollPositionToBoundsIfNecessary() = 0; |
| 38 }; |
| 39 |
| 40 } // namespace cc |
| 41 |
| 42 #endif // CC_INPUT_SCROLL_ELASTICITY_CONTROLLER_H_ |
OLD | NEW |