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}
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index e66a1ff9..424cc53 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -189,8 +189,10 @@
                                float page_scale,
                                base::TimeDelta duration);
   void SetNeedsAnimateInput() override;
-  bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point,
-                                   InputHandler::ScrollInputType type) override;
+  bool IsCurrentlyScrollingRoot() const override;
+  bool IsCurrentlyScrollingLayerAt(
+      const gfx::Point& viewport_point,
+      InputHandler::ScrollInputType type) const override;
   bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) override;
   bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_port) override;
   scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
@@ -642,7 +644,6 @@
       LayerImpl* scrolling_layer_impl,
       InputHandler::ScrollInputType type);
 
-  void AnimateInput(base::TimeTicks monotonic_time);
   void AnimatePageScale(base::TimeTicks monotonic_time);
   void AnimateScrollbars(base::TimeTicks monotonic_time);
   void AnimateTopControls(base::TimeTicks monotonic_time);
@@ -742,7 +743,6 @@
 
   // The optional delegate for the root layer scroll offset.
   LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
-  LayerScrollOffsetDelegate::AnimationCallback root_layer_animation_callback_;
 
   const LayerTreeSettings settings_;
   LayerTreeDebugState debug_state_;