Index: cc/input/scroll_elasticity_controller.h |
diff --git a/cc/input/scroll_elasticity_controller.h b/cc/input/scroll_elasticity_controller.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..382ae610a7d18f65c7223aa285789703c68c8684 |
--- /dev/null |
+++ b/cc/input/scroll_elasticity_controller.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2014 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_INPUT_SCROLL_ELASTICITY_CONTROLLER_H_ |
+#define CC_INPUT_SCROLL_ELASTICITY_CONTROLLER_H_ |
+ |
+#include "base/time/time.h" |
+#include "cc/base/cc_export.h" |
+#include "ui/gfx/geometry/vector2d_f.h" |
+ |
+namespace cc { |
+ |
+class CC_EXPORT ScrollElasticityController { |
+ public: |
+ virtual void WillShutdown() = 0; |
+ virtual void Animate(base::TimeTicks time) = 0; |
+}; |
+ |
+class CC_EXPORT ScrollElasticityControllerClient { |
+ public: |
+ virtual void BindToController(ScrollElasticityController* controller) = 0; |
+ |
+ virtual bool allowsHorizontalStretching() const = 0; |
+ virtual bool allowsVerticalStretching() const = 0; |
+ virtual gfx::Vector2dF stretchAmount() const = 0; |
+ virtual bool pinnedInDirection(const gfx::Vector2dF& delta) const = 0; |
+ virtual bool canScrollHorizontally() const = 0; |
+ virtual bool canScrollVertically() const = 0; |
+ virtual gfx::Vector2dF absoluteScrollPosition() const = 0; |
+ |
+ virtual void immediateScrollBy(const gfx::Vector2dF& delta) = 0; |
+ virtual void immediateScrollByWithoutContentEdgeConstraints(const gfx::Vector2dF& delta) = 0; |
+ virtual void startSnapRubberbandTimer() = 0; |
+ virtual void stopSnapRubberbandTimer() = 0; |
+ |
+ virtual void adjustScrollPositionToBoundsIfNecessary() = 0; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_INPUT_SCROLL_ELASTICITY_CONTROLLER_H_ |