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

Unified Diff: cc/layers/layer_impl.h

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done 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
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index a3c621dd3577e7b350fb0880afd864e84ba66895..243822241eb7d148c26f30f8662909cd42f7ea30 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -315,6 +315,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;
@@ -324,10 +326,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 {
@@ -518,6 +526,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698