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

Side by Side Diff: ui/android/overscroll_refresh.cc

Issue 2528823002: Separate SwipeRefreshHandler and ContentViewCore (Closed)
Patch Set: tedchoc's requested changes Created 4 years 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 unified diff | Download patch
« no previous file with comments | « ui/android/overscroll_refresh.h ('k') | ui/android/overscroll_refresh_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/android/overscroll_refresh.h" 5 #include "ui/android/overscroll_refresh.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/android/overscroll_refresh_handler.h"
8 9
9 namespace ui { 10 namespace ui {
10 namespace { 11 namespace {
11 12
12 // Experimentally determined constant used to allow activation even if touch 13 // Experimentally determined constant used to allow activation even if touch
13 // release results in a small upward fling (quite common during a slow scroll). 14 // release results in a small upward fling (quite common during a slow scroll).
14 const float kMinFlingVelocityForActivation = -500.f; 15 const float kMinFlingVelocityForActivation = -500.f;
15 16
16 } // namespace 17 } // namespace
17 18
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 overflow_y_hidden_ = root_overflow_y_hidden; 96 overflow_y_hidden_ = root_overflow_y_hidden;
96 } 97 }
97 98
98 void OverscrollRefresh::Release(bool allow_refresh) { 99 void OverscrollRefresh::Release(bool allow_refresh) {
99 if (scroll_consumption_state_ == ENABLED) 100 if (scroll_consumption_state_ == ENABLED)
100 handler_->PullRelease(allow_refresh); 101 handler_->PullRelease(allow_refresh);
101 scroll_consumption_state_ = DISABLED; 102 scroll_consumption_state_ = DISABLED;
102 } 103 }
103 104
104 } // namespace ui 105 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/overscroll_refresh.h ('k') | ui/android/overscroll_refresh_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698