Chromium Code Reviews| 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..e6365e761efcf46b874aada5949d872a3fdb9795 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,8 @@ 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 SetNeedsAnimateFling(const AnimationCallback& fling_animation) override; |
|
jdduke (slow)
2015/05/18 21:18:34
Let's go ahead and rename this to |SetNeedsAnimate
hush (inactive)
2015/05/19 18:14:59
Done.
|
| void DidOverscroll(gfx::Vector2dF accumulated_overscroll, |
| gfx::Vector2dF latest_overscroll_delta, |
| gfx::Vector2dF current_fling_velocity) override; |
| @@ -144,6 +146,10 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
| // compositor that are not directly exposed here. |
| void ForceFakeCompositeSW(); |
| + // Honor the requested fling animation as contained in |
| + // |pending_fling_animation_|. |
| + void FlushPendingFlingAnimation(base::TimeTicks animation_time); |
| + |
| gfx::Vector2d max_scroll_offset() const; |
| void UpdateMemoryPolicy(); |
| @@ -179,6 +185,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 |
| + // animation callback as long as they're required. |
| + AnimationCallback pending_fling_animation_; |
| + |
| // Current scroll offset in CSS pixels. |
| gfx::Vector2dF scroll_offset_dip_; |