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

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

Issue 2528823002: Separate SwipeRefreshHandler and ContentViewCore (Closed)
Patch Set: Fix non-Android compile issue 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
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 ~OverscrollRefreshHandler();
18 // Signals the start of an overscrolling pull. Returns whether the handler
19 // will consume the overscroll gesture, in which case it will receive the
20 // remaining pull updates.
21 bool PullStart();
22
23 // Signals a pull update, where |delta| is in device pixels.
24 void PullUpdate(float delta);
25
26 // Signals the release of the pull, and whether the release is allowed to
27 // trigger the refresh action.
28 void PullRelease(bool allow_refresh);
29
30 // Reset the active pull state.
31 void PullReset();
32
33 private:
34 base::android::ScopedJavaGlobalRef<jobject> j_overscroll_refresh_handler_;
35 };
36 }
37
38 #endif // UI_ANDROID_OVERSCROLL_REFRESH_HANDLER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698