Move SetHasTouchEventHandlers from WebLayerTreeView to WebWidgetClient (14/n)

We are removing the WebLayerTreeView interface as it is redundant with
WebWidgetClient now that we always composite web contents.

More importantly this helps us Close/Restart the WebWidget parts of
WebViewImpl by not requiring plumbing 2 pointers with slightly different
lifetimes (WebLayerTreeView is created inside the Init of the
WebWidgetClient). This will help avoid a bunch of complexity in
creating WebFrameWidgets and other WebWidgets.

The HaveScrollEventHandlers() method is only used in blink_unittests
and they can get at the TestWebWidgetClient, so remove it from the
public APIs entirely.

WebPagePopups don't have scroll event handlers, and even if they did
they don't need to tell the compositor. Add a comment and a
NOTREACHED() instead of code.

[email protected]

Bug: 912193
Change-Id: I5aed86e0773953428aded533df4395c29f3bd451
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713746
Commit-Queue: danakj <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#680063}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 370773c..734c561 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -3303,6 +3303,11 @@
   Send(new WidgetHostMsg_HasTouchEventHandlers(routing_id_, has_handlers));
 }
 
+void RenderWidget::SetHaveScrollEventHandlers(bool have_handlers) {
+  layer_tree_view_->layer_tree_host()->SetHaveScrollEventHandlers(
+      have_handlers);
+}
+
 void RenderWidget::SetNeedsLowLatencyInput(bool needs_low_latency) {
   if (input_event_queue_)
     input_event_queue_->SetNeedsLowLatency(needs_low_latency);