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

Side by Side Diff: ui/android/overscroll_refresh_handler.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_handler.h ('k') | ui/android/overscroll_refresh_unittest.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 #include "ui/android/overscroll_refresh_handler.h"
6
7 #include "base/android/jni_android.h"
8 #include "jni/OverscrollRefreshHandler_jni.h"
9
10 using base::android::AttachCurrentThread;
11
12 namespace ui {
13
14 OverscrollRefreshHandler::OverscrollRefreshHandler(
15 const base::android::JavaRef<jobject>& j_overscroll_refresh_handler) {
16 j_overscroll_refresh_handler_.Reset(AttachCurrentThread(),
17 j_overscroll_refresh_handler.obj());
18 }
19
20 OverscrollRefreshHandler::~OverscrollRefreshHandler() {}
21
22 bool OverscrollRefreshHandler::PullStart() {
23 return Java_OverscrollRefreshHandler_start(AttachCurrentThread(),
24 j_overscroll_refresh_handler_);
25 }
26
27 void OverscrollRefreshHandler::PullUpdate(float delta) {
28 Java_OverscrollRefreshHandler_pull(AttachCurrentThread(),
29 j_overscroll_refresh_handler_, delta);
30 }
31
32 void OverscrollRefreshHandler::PullRelease(bool allow_refresh) {
33 Java_OverscrollRefreshHandler_release(
34 AttachCurrentThread(), j_overscroll_refresh_handler_, allow_refresh);
35 }
36
37 void OverscrollRefreshHandler::PullReset() {
38 Java_OverscrollRefreshHandler_reset(AttachCurrentThread(),
39 j_overscroll_refresh_handler_);
40 }
41
42 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/overscroll_refresh_handler.h ('k') | ui/android/overscroll_refresh_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698