diff options
author | dtapuska <dtapuska@chromium.org> | 2016-01-29 07:14:48 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-29 15:15:37 +0000 |
commit | ee0b6981de62e9a234d031eab793da8d7752197b (patch) | |
tree | ef42a954bec374daaf7ca14a16a52e361c22ae56 /content | |
parent | c068fa909f540cc362576559c7eb9e205918f0a1 (diff) | |
download | chromium_src-ee0b6981de62e9a234d031eab793da8d7752197b.zip chromium_src-ee0b6981de62e9a234d031eab793da8d7752197b.tar.gz chromium_src-ee0b6981de62e9a234d031eab793da8d7752197b.tar.bz2 |
Move have_wheel_event_handlers to WebLayerTreeView.
Since having wheel event handlers was based on the document in general
there was no need for the hit testing code for determining the layer in
cc. So it makes more sense to have these fields on the layer tree view.
BUG=489802
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1639363002
Cr-Commit-Position: refs/heads/master@{#372346}
Diffstat (limited to 'content')
4 files changed, 21 insertions, 0 deletions
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index beaae75..5bf9c46 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -745,6 +745,14 @@ void RenderWidgetCompositor::clearSelection() { layer_tree_host_->RegisterSelection(empty_selection); } +void RenderWidgetCompositor::setHaveWheelEventHandlers(bool value) { + layer_tree_host_->SetHaveWheelEventHandlers(value); +} + +bool RenderWidgetCompositor::haveWheelEventHandlers() const { + return layer_tree_host_->have_wheel_event_handlers(); +} + void CompositeAndReadbackAsyncCallback( blink::WebCompositeAndReadbackAsyncCallback* callback, scoped_ptr<cc::CopyOutputResult> result) { diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h index 9600506..073fd77 100644 --- a/content/renderer/gpu/render_widget_compositor.h +++ b/content/renderer/gpu/render_widget_compositor.h @@ -135,6 +135,8 @@ class CONTENT_EXPORT RenderWidgetCompositor void clearViewportLayers() override; void registerSelection(const blink::WebSelection& selection) override; void clearSelection() override; + void setHaveWheelEventHandlers(bool) override; + bool haveWheelEventHandlers() const override; int layerTreeId() const override; void setShowFPSCounter(bool show) override; void setShowPaintRects(bool show) override; diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc index 0bb14af..7dbc162 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.cc +++ b/content/test/web_layer_tree_view_impl_for_testing.cc @@ -200,4 +200,13 @@ void WebLayerTreeViewImplForTesting::registerSelection( void WebLayerTreeViewImplForTesting::clearSelection() { } +void WebLayerTreeViewImplForTesting::setHaveWheelEventHandlers( + bool have_event_handlers) { + layer_tree_host_->SetHaveWheelEventHandlers(have_event_handlers); +} + +bool WebLayerTreeViewImplForTesting::haveWheelEventHandlers() const { + return layer_tree_host_->have_wheel_event_handlers(); +} + } // namespace content diff --git a/content/test/web_layer_tree_view_impl_for_testing.h b/content/test/web_layer_tree_view_impl_for_testing.h index 4596be8..9518a5b 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.h +++ b/content/test/web_layer_tree_view_impl_for_testing.h @@ -67,6 +67,8 @@ class WebLayerTreeViewImplForTesting void clearViewportLayers() override; void registerSelection(const blink::WebSelection& selection) override; void clearSelection() override; + void setHaveWheelEventHandlers(bool have_event_handlers) override; + bool haveWheelEventHandlers() const override; // cc::LayerTreeHostClient implementation. void WillBeginMainFrame() override {} |