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

Unified Diff: ui/android/overscroll_refresh.cc

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Update the test Created 3 years, 6 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: ui/android/overscroll_refresh.cc
diff --git a/ui/android/overscroll_refresh.cc b/ui/android/overscroll_refresh.cc
index 2f2af62d8cd56abe468ecb688e0675fa140b8ccc..22361e435c35b3682d7a91a254c128d84bbbc562 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,11 +49,11 @@ void OverscrollRefresh::OnScrollEnd(const gfx::Vector2dF& scroll_velocity) {
Release(allow_activation);
}
-void OverscrollRefresh::OnScrollUpdateAck(bool was_consumed) {
+void OverscrollRefresh::OnOverscrolled(bool can_navigate) {
if (scroll_consumption_state_ != AWAITING_SCROLL_UPDATE_ACK)
return;
- if (was_consumed) {
+ if (!can_navigate) {
scroll_consumption_state_ = DISABLED;
return;
}

Powered by Google App Engine
This is Rietveld 408576698