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

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

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Rebase Created 3 years, 4 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
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | content/browser/android/overscroll_controller_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f049bdc2cd9200ac46d1aa52407a2eb7bcd3938c..b90515618888a5391b7142dd2807a9073eff4804 100644
--- a/content/browser/android/overscroll_controller_android.h
+++ b/content/browser/android/overscroll_controller_android.h
@@ -10,6 +10,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
#include "base/time/time.h"
+#include "content/common/content_export.h"
#include "content/common/input/input_event_ack_state.h"
#include "ui/android/overscroll_glow.h"
#include "ui/android/overscroll_refresh.h"
@@ -34,12 +35,20 @@ namespace content {
// 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 ui::OverscrollGlowClient {
+class CONTENT_EXPORT OverscrollControllerAndroid
+ : public ui::OverscrollGlowClient {
public:
OverscrollControllerAndroid(
ui::OverscrollRefreshHandler* overscroll_refresh_handler,
ui::WindowAndroidCompositor* compositor,
float dpi_scale);
+
+ static std::unique_ptr<OverscrollControllerAndroid> CreateForTests(
+ ui::WindowAndroidCompositor* compositor,
+ float dpi_scale,
+ std::unique_ptr<ui::OverscrollGlow> glow_effect,
+ std::unique_ptr<ui::OverscrollRefresh> refresh_effect);
+
~OverscrollControllerAndroid() override;
// Returns true if |event| is consumed by an overscroll effect, in which
@@ -66,6 +75,13 @@ class OverscrollControllerAndroid : public ui::OverscrollGlowClient {
void Disable();
private:
+ // This method should only be called from CreateForTests.
+ OverscrollControllerAndroid(
+ ui::WindowAndroidCompositor* compositor,
+ float dpi_scale,
+ std::unique_ptr<ui::OverscrollGlow> glow_effect,
+ std::unique_ptr<ui::OverscrollRefresh> refresh_effect);
+
// OverscrollGlowClient implementation.
std::unique_ptr<ui::EdgeEffectBase> CreateEdgeEffect() override;
« no previous file with comments | « cc/trees/layer_tree_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