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

Unified Diff: android_webview/browser/browser_view_renderer.h

Issue 1063853005: Unify Android Webview and Chrome's fling (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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: android_webview/browser/browser_view_renderer.h
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h
index 477a039cecc344617fb77a5424e38c8310d498e0..1c790e1d2198de3338c750d649bb7b5cbb7dc93e 100644
--- a/android_webview/browser/browser_view_renderer.h
+++ b/android_webview/browser/browser_view_renderer.h
@@ -74,6 +74,7 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient {
void OnSizeChanged(int width, int height);
void OnAttachedToWindow(int width, int height);
void OnDetachedFromWindow();
+ void OnComputeScroll(base::TimeTicks animation_time);
// Sets the scale for logical<->physical pixel conversions.
void SetDipScale(float dip_scale);
@@ -106,7 +107,9 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient {
float page_scale_factor,
float min_page_scale_factor,
float max_page_scale_factor) override;
- bool IsExternalFlingActive() const override;
+ bool IsExternalScrollActive() const override;
+ void SetNeedsAnimateScroll(
+ const AnimationCallback& scroll_animation) override;
void DidOverscroll(gfx::Vector2dF accumulated_overscroll,
gfx::Vector2dF latest_overscroll_delta,
gfx::Vector2dF current_fling_velocity) override;
@@ -179,6 +182,11 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient {
gfx::Size size_;
+ // Used to drive a fling animation as requested by the compositor. This acts
+ // as a single-shot animation; the compositor will continually post an
boliu 2015/06/08 16:54:52 carried over from before, there's an extra space b
hush (inactive) 2015/06/09 19:11:34 Done.
+ // animation callback as long as they're required.
+ AnimationCallback pending_fling_animation_;
+
// Current scroll offset in CSS pixels.
gfx::Vector2dF scroll_offset_dip_;
« no previous file with comments | « no previous file | android_webview/browser/browser_view_renderer.cc » ('j') | android_webview/browser/browser_view_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698