OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/testing/WebLayerTreeViewImplForTesting.h" | 5 #include "platform/testing/WebLayerTreeViewImplForTesting.h" |
6 | 6 |
7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
9 #include "cc/animation/animation_timeline.h" | 9 #include "cc/animation/animation_timeline.h" |
10 #include "cc/blink/web_layer_impl.h" | 10 #include "cc/blink/web_layer_impl.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 void WebLayerTreeViewImplForTesting::registerViewportLayers( | 151 void WebLayerTreeViewImplForTesting::registerViewportLayers( |
152 const blink::WebLayer* overscrollElasticityLayer, | 152 const blink::WebLayer* overscrollElasticityLayer, |
153 const blink::WebLayer* pageScaleLayer, | 153 const blink::WebLayer* pageScaleLayer, |
154 const blink::WebLayer* innerViewportScrollLayer, | 154 const blink::WebLayer* innerViewportScrollLayer, |
155 const blink::WebLayer* outerViewportScrollLayer) { | 155 const blink::WebLayer* outerViewportScrollLayer) { |
156 m_layerTreeHost->RegisterViewportLayers( | 156 m_layerTreeHost->RegisterViewportLayers( |
157 // The scroll elasticity layer will only exist when using pinch virtual | 157 // The scroll elasticity layer will only exist when using pinch virtual |
158 // viewports. | 158 // viewports. |
159 overscrollElasticityLayer | 159 overscrollElasticityLayer ? static_cast<const cc_blink::WebLayerImpl*>( |
160 ? static_cast<const cc_blink::WebLayerImpl*>( | 160 overscrollElasticityLayer) |
161 overscrollElasticityLayer) | 161 ->layer() |
162 ->layer() | 162 : nullptr, |
163 : nullptr, | |
164 static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(), | 163 static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(), |
165 static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer) | 164 static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer) |
166 ->layer(), | 165 ->layer(), |
167 // The outer viewport layer will only exist when using pinch virtual | 166 // The outer viewport layer will only exist when using pinch virtual |
168 // viewports. | 167 // viewports. |
169 outerViewportScrollLayer | 168 outerViewportScrollLayer |
170 ? static_cast<const cc_blink::WebLayerImpl*>(outerViewportScrollLayer) | 169 ? static_cast<const cc_blink::WebLayerImpl*>(outerViewportScrollLayer) |
171 ->layer() | 170 ->layer() |
172 : nullptr); | 171 : nullptr); |
173 } | 172 } |
(...skipping 30 matching lines...) Expand all Loading... |
204 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( | 203 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( |
205 bool haveEentHandlers) { | 204 bool haveEentHandlers) { |
206 m_layerTreeHost->SetHaveScrollEventHandlers(haveEentHandlers); | 205 m_layerTreeHost->SetHaveScrollEventHandlers(haveEentHandlers); |
207 } | 206 } |
208 | 207 |
209 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { | 208 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { |
210 return m_layerTreeHost->have_scroll_event_handlers(); | 209 return m_layerTreeHost->have_scroll_event_handlers(); |
211 } | 210 } |
212 | 211 |
213 } // namespace blink | 212 } // namespace blink |
OLD | NEW |