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

Unified Diff: cc/input/scroll_elasticity_controller.h

Issue 704463003: Move overscroll bounce to impl thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698