Android: Edge glow effect for history navigation
Shows the edge glow effect when further forward navigation is not
possible. There are three cases to consider: native pages, rendered
pages, and tab switcher:
- Native pages: uses android.widget.EdgeEffect (GlowView)
- Rendered pages: uses ui::OverscrollGlow on cc::Layer of WebContents'
native view
- Tab switcher: also ui::OverscrollGlow on cc::Layer of StackLayout's
SceneLayer
All the logic is behind a new class NavigationGlow.
Bug: 937946
Change-Id: I7771a23ae861188a40388659baa784111e58140d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1583169
Reviewed-by: Matthew Jones <[email protected]>
Reviewed-by: Ted Choc <[email protected]>
Commit-Queue: Jinsuk Kim <[email protected]>
Cr-Commit-Position: refs/heads/master@{#657496}
diff --git a/ui/android/overscroll_refresh_handler.h b/ui/android/overscroll_refresh_handler.h
index 3471c2f..3322458 100644
--- a/ui/android/overscroll_refresh_handler.h
+++ b/ui/android/overscroll_refresh_handler.h
@@ -24,7 +24,10 @@
// Signals the start of an overscrolling pull. Returns whether the handler
// will consume the overscroll gesture, in which case it will receive the
// remaining pull updates.
- virtual bool PullStart(OverscrollAction type, bool navigate_forward);
+ virtual bool PullStart(OverscrollAction type,
+ float startx,
+ float starty,
+ bool navigate_forward);
// Signals a pull update, where |x_delta| and |y_delta| are in device pixels.
virtual void PullUpdate(float x_delta, float y_delta);