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

Unified Diff: cc/input/scroll_elasticity_helper.h

Issue 2194833002: Overscroll and Elasticity for views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-RouteThroughInputHandler
Patch Set: Restore functionality and fix bugs \o/ Created 4 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/input/scroll_elasticity_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/scroll_elasticity_helper.h
diff --git a/cc/input/scroll_elasticity_helper.h b/cc/input/scroll_elasticity_helper.h
index 3ad28fb2cbd6cfaabd1ffa9d59f5e64d9175c535..766c5dfbc707f54e7ed336e75006d6feb5aff4f3 100644
--- a/cc/input/scroll_elasticity_helper.h
+++ b/cc/input/scroll_elasticity_helper.h
@@ -5,6 +5,9 @@
#ifndef CC_INPUT_SCROLL_ELASTICITY_HELPER_H_
#define CC_INPUT_SCROLL_ELASTICITY_HELPER_H_
+#include <memory>
+
+#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "cc/base/cc_export.h"
#include "ui/gfx/geometry/scroll_offset.h"
@@ -47,6 +50,9 @@ class LayerTreeHostImpl;
// of logic and state held directly inside LayerTreeHostImpl.
class CC_EXPORT ScrollElasticityHelper {
public:
+ static std::unique_ptr<ScrollElasticityHelper> CreateForLayer(
+ int layer_scroll_layer_id,
+ LayerTreeHostImpl* layer_tree_host_impl);
static ScrollElasticityHelper* CreateForLayerTreeHostImpl(
LayerTreeHostImpl* layer_tree_host_impl);
@@ -63,6 +69,8 @@ class CC_EXPORT ScrollElasticityHelper {
virtual gfx::ScrollOffset MaxScrollOffset() const = 0;
virtual void ScrollBy(const gfx::Vector2dF& delta) = 0;
+ virtual base::WeakPtr<ScrollElasticityHelper> GetWeakPtr() = 0;
+
// Requests that another frame happens for the controller to continue ticking
// animations.
virtual void RequestOneBeginFrame() = 0;
« no previous file with comments | « cc/input/input_handler.h ('k') | cc/input/scroll_elasticity_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698