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

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

Issue 894193005: [Android] Use the platform SwipeRefreshLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 months 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 e7a5196bda6420427699f607e7bbadfd55e437c1..5f76dab4352787e50898efb3158c9678e7523a2a 100644
--- a/content/browser/android/overscroll_controller_android.h
+++ b/content/browser/android/overscroll_controller_android.h
@@ -27,18 +27,16 @@ class WindowAndroidCompositor;
namespace content {
+class ContentViewCoreImpl;
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 OverscrollGlowClient,
- public OverscrollRefreshClient,
public WebContentsObserver {
public:
- OverscrollControllerAndroid(WebContents* web_contents,
- ui::WindowAndroidCompositor* compositor,
- float dpi_scale);
+ explicit OverscrollControllerAndroid(ContentViewCoreImpl* content_view_core);
~OverscrollControllerAndroid() override;
// Returns true if |event| is consumed by an overscroll effect, in which
@@ -66,20 +64,14 @@ class OverscrollControllerAndroid : public OverscrollGlowClient,
private:
// WebContentsObserver implementation.
- void DidNavigateMainFrame(const LoadCommittedDetails& details,
- const FrameNavigateParams& params) override;
void DidToggleFullscreenModeForTab(bool entered_fullscreen) override;
- // OverscrollRefreshClient implementation.
- void TriggerRefresh() override;
- bool IsStillRefreshing() const override;
-
// OverscrollGlowClient implementation.
scoped_ptr<EdgeEffectBase> CreateEdgeEffect() override;
void SetNeedsAnimate();
- ui::WindowAndroidCompositor* compositor_;
+ ui::WindowAndroidCompositor* const compositor_;
const float dpi_scale_;
bool enabled_;
@@ -87,7 +79,7 @@ class OverscrollControllerAndroid : public OverscrollGlowClient,
// TODO(jdduke): Factor out a common API from the two overscroll effects.
scoped_ptr<OverscrollGlow> glow_effect_;
scoped_ptr<OverscrollRefresh> refresh_effect_;
- bool triggered_refresh_active_;
+ bool has_initialized_refresh_effect_;
bool is_fullscreen_;
DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid);
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/android/overscroll_controller_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698