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

Unified Diff: cc/layers/layer_impl.h

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Combined rebase Created 4 years, 5 months 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
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 66acc46f24c692c618bd4e5500d1364f09d34e1e..bdea5093496ba7104dde139bb8570f00ac449066 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -311,6 +311,8 @@ class CC_EXPORT LayerImpl {
void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset);
gfx::ScrollOffset CurrentScrollOffset() const;
+ void SetCurrentOverscroll(const gfx::ScrollOffset& overscroll);
+ gfx::ScrollOffset CurrentOverscroll() const;
gfx::ScrollOffset MaxScrollOffset() const;
gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const;
@@ -320,10 +322,16 @@ class CC_EXPORT LayerImpl {
// initial scroll
gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
- void SetScrollClipLayer(int scroll_clip_layer_id);
+ // TODO(tapted): Remove this overload.
+ void SetScrollClipLayer(int scroll_clip_layer_id) {
+ SetScrollClipAndCanOverscroll(scroll_clip_layer_id, false);
+ }
+ void SetScrollClipAndCanOverscroll(int scroll_clip_layer_id,
+ bool can_overscroll);
int scroll_clip_layer_id() const { return scroll_clip_layer_id_; }
LayerImpl* scroll_clip_layer() const;
bool scrollable() const;
+ bool can_overscroll() const { return can_overscroll_; }
void set_user_scrollable_horizontal(bool scrollable);
bool user_scrollable_horizontal() const {
@@ -514,6 +522,7 @@ class CC_EXPORT LayerImpl {
bool user_scrollable_horizontal_ : 1;
bool user_scrollable_vertical_ : 1;
+ bool can_overscroll_ : 1;
bool should_flatten_transform_from_property_tree_ : 1;
// Tracks if drawing-related properties have changed since last redraw.
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | ui/events/event_constants.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698