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

Side by Side Diff: ui/android/overscroll_refresh_handler.h

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.cc ('k') | ui/android/overscroll_refresh_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_ANDROID_OVERSCROLL_REFRESH_HANDLER_H_
6 #define UI_ANDROID_OVERSCROLL_REFRESH_HANDLER_H_
7
8 #include "base/android/scoped_java_ref.h"
9 #include "ui/android/ui_android_export.h"
10
11 namespace ui {
12
13 class UI_ANDROID_EXPORT OverscrollRefreshHandler {
14 public:
15 explicit OverscrollRefreshHandler(
16 const base::android::JavaRef<jobject>& j_overscroll_refresh_handler);
17
18 // Note: the following methods are virtual because this class is overridden
19 // for testing in overscroll_refresh_unittest.cc
20
21 virtual ~OverscrollRefreshHandler();
22
23 // Signals the start of an overscrolling pull. Returns whether the handler
24 // will consume the overscroll gesture, in which case it will receive the
25 // remaining pull updates.
26 virtual bool PullStart();
27
28 // Signals a pull update, where |delta| is in device pixels.
29 virtual void PullUpdate(float delta);
30
31 // Signals the release of the pull, and whether the release is allowed to
32 // trigger the refresh action.
33 virtual void PullRelease(bool allow_refresh);
34
35 // Reset the active pull state.
36 virtual void PullReset();
37
38 private:
39 base::android::ScopedJavaGlobalRef<jobject> j_overscroll_refresh_handler_;
40 };
41
42 } // namespace ui
43
44 #endif // UI_ANDROID_OVERSCROLL_REFRESH_HANDLER_H_
OLDNEW
« no previous file with comments | « ui/android/overscroll_refresh.cc ('k') | ui/android/overscroll_refresh_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698