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

Unified Diff: content/browser/android/overscroll_controller_android.h

Issue 733293002: [Android] Add a flag to disable the pull-to-refresh effect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/overscroll_controller_android.h
diff --git a/content/browser/android/overscroll_controller_android.h b/content/browser/android/overscroll_controller_android.h
index 3de5e5294e5159be359e949540a2ffcae3b612f0..fb18098c25dfdf297d7e313669394bfb73c2beaa 100644
--- a/content/browser/android/overscroll_controller_android.h
+++ b/content/browser/android/overscroll_controller_android.h
@@ -32,7 +32,8 @@ struct DidOverscrollParams;
// Glue class for handling all inputs into Android-specific overscroll effects,
// both the passive overscroll glow and the active overscroll pull-to-refresh.
// Note that all input coordinates (both for events and overscroll) are in DIPs.
-class OverscrollControllerAndroid : public OverscrollRefreshClient,
+class OverscrollControllerAndroid : public OverscrollGlowClient,
+ public OverscrollRefreshClient,
public WebContentsObserver {
public:
OverscrollControllerAndroid(WebContents* web_contents,
@@ -72,6 +73,9 @@ class OverscrollControllerAndroid : public OverscrollRefreshClient,
void TriggerRefresh() override;
bool IsStillRefreshing() const override;
+ // OverscrollGlowClient implementation.
+ scoped_ptr<EdgeEffectBase> CreateEdgeEffect() override;
+
void SetNeedsAnimate();
ui::WindowAndroidCompositor* compositor_;
@@ -80,8 +84,8 @@ class OverscrollControllerAndroid : public OverscrollRefreshClient,
bool enabled_;
// TODO(jdduke): Factor out a common API from the two overscroll effects.
- OverscrollGlow glow_effect_;
- OverscrollRefresh refresh_effect_;
+ scoped_ptr<OverscrollGlow> glow_effect_;
+ scoped_ptr<OverscrollRefresh> refresh_effect_;
bool triggered_refresh_active_;
DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid);
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/browser/android/overscroll_controller_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698