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

Side by Side Diff: chrome/browser/android/swipe_refresh_handler.h

Issue 2528823002: Separate SwipeRefreshHandler and ContentViewCore (Closed)
Patch Set: Move web_contents_view_android.h header in web_contents_android.h into cc file, modify CreateRefres… 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 CHROME_BROWSER_ANDROID_SWIPE_REFRESH_HANDLER_H_
6 #define CHROME_BROWSER_ANDROID_SWIPE_REFRESH_HANDLER_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/android/jni_weak_ref.h"
10 #include "ui/android/overscroll_refresh.h"
11
12 class SwipeRefreshHandler : public ui::OverscrollRefreshHandler {
13 public:
14 SwipeRefreshHandler(JNIEnv* env, const base::android::JavaRef<jobject>& obj);
15
16 bool PullStart() override;
17 void PullUpdate(float delta) override;
18 void PullRelease(bool allow_refresh) override;
19 void PullReset() override;
20
21 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
22
23 // Register the SwipeRefreshHandler's native methods through JNI.
24 static bool RegisterSwipeRefreshHandler(JNIEnv* env);
25
26 private:
27 // A weak reference to the Java SwipeRefreshHandler object.
28 JavaObjectWeakGlobalRef java_ref_;
29
30 DISALLOW_COPY_AND_ASSIGN(SwipeRefreshHandler);
31 };
32
33 #endif // CHROME_BROWSER_ANDROID_SWIPE_REFRESH_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698