From e9f830c3b57371a0b3d090f48be2545a58eba3d6 Mon Sep 17 00:00:00 2001 From: danakj Date: Wed, 9 Sep 2015 14:36:16 -0700 Subject: Move the AnimateInput paths for WebView around to not path through cc. They don't need to go through cc, so let's not and this lets cc reason about when/how things happen better. Adds 2 new interfaces: - SynchronousInputHandlerProxy. A limited view of the InputHandlerProxy given out to WebView to control animating timing. It lets WebView call SynchronouslyAnimate() to do animations. And if cc tried to also animate, we'd hit a DCHECK. - SynchronousInputHandler. An interface given to the InputHandlerProxy as an alternate place to handle requests for animation. When it's present animate requests go there instead of the usual InputHandler. R=boliu, enne, hush, jdduke, sievers BUG=522658 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1307203003 Cr-Commit-Position: refs/heads/master@{#348014} --- cc/input/input_handler.h | 6 +++++- cc/input/layer_scroll_offset_delegate.h | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'cc/input') diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h index 4852bdc..67a2c57 100644 --- a/cc/input/input_handler.h +++ b/cc/input/input_handler.h @@ -143,9 +143,13 @@ class CC_EXPORT InputHandler { // Request another callback to InputHandlerClient::Animate(). virtual void SetNeedsAnimateInput() = 0; + // If there is a scroll active, this reports whether the scroll is on the + // root layer, or on some other sublayer. + virtual bool IsCurrentlyScrollingRoot() const = 0; + // Whether the layer under |viewport_point| is the currently scrolling layer. virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, - ScrollInputType type) = 0; + ScrollInputType type) const = 0; virtual bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) = 0; diff --git a/cc/input/layer_scroll_offset_delegate.h b/cc/input/layer_scroll_offset_delegate.h index a0c0e0d..afd6e4b 100644 --- a/cc/input/layer_scroll_offset_delegate.h +++ b/cc/input/layer_scroll_offset_delegate.h @@ -44,11 +44,6 @@ class LayerScrollOffsetDelegate { float min_page_scale_factor, float max_page_scale_factor) = 0; - // This is called by the compositor when a fling hitting the root layer - // requires a scheduled animation update. - typedef base::Callback AnimationCallback; - virtual void SetNeedsAnimate(const AnimationCallback& animation) = 0; - protected: LayerScrollOffsetDelegate() {} virtual ~LayerScrollOffsetDelegate() {} -- cgit v1.1