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

Unified Diff: ui/android/overscroll_refresh.cc

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Rebase Created 3 years, 4 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 | « ui/android/overscroll_refresh.h ('k') | ui/android/overscroll_refresh_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/overscroll_refresh.cc
diff --git a/ui/android/overscroll_refresh.cc b/ui/android/overscroll_refresh.cc
index 2f2af62d8cd56abe468ecb688e0675fa140b8ccc..60b54aa3dc127b8bcd6e509e2b23a9462e1ad429 100644
--- a/ui/android/overscroll_refresh.cc
+++ b/ui/android/overscroll_refresh.cc
@@ -24,6 +24,12 @@ OverscrollRefresh::OverscrollRefresh(OverscrollRefreshHandler* handler)
DCHECK(handler);
}
+OverscrollRefresh::OverscrollRefresh()
+ : scrolled_to_top_(true),
+ overflow_y_hidden_(false),
+ scroll_consumption_state_(DISABLED),
+ handler_(nullptr) {}
+
OverscrollRefresh::~OverscrollRefresh() {
}
@@ -43,15 +49,10 @@ void OverscrollRefresh::OnScrollEnd(const gfx::Vector2dF& scroll_velocity) {
Release(allow_activation);
}
-void OverscrollRefresh::OnScrollUpdateAck(bool was_consumed) {
+void OverscrollRefresh::OnOverscrolled() {
if (scroll_consumption_state_ != AWAITING_SCROLL_UPDATE_ACK)
return;
- if (was_consumed) {
- scroll_consumption_state_ = DISABLED;
- return;
- }
-
scroll_consumption_state_ = handler_->PullStart() ? ENABLED : DISABLED;
}
« no previous file with comments | « ui/android/overscroll_refresh.h ('k') | ui/android/overscroll_refresh_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698