| 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 "content/test/web_layer_tree_view_impl_for_testing.h" | 5 #include "content/test/web_layer_tree_view_impl_for_testing.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 } | 142 } |
| 143 | 143 |
| 144 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface() { | 144 void WebLayerTreeViewImplForTesting::RequestNewOutputSurface() { |
| 145 // Intentionally do not create and set an OutputSurface. | 145 // Intentionally do not create and set an OutputSurface. |
| 146 } | 146 } |
| 147 | 147 |
| 148 void WebLayerTreeViewImplForTesting::DidFailToInitializeOutputSurface() { | 148 void WebLayerTreeViewImplForTesting::DidFailToInitializeOutputSurface() { |
| 149 NOTREACHED(); | 149 NOTREACHED(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void WebLayerTreeViewImplForTesting::registerForAnimations( | |
| 153 blink::WebLayer* layer) { | |
| 154 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); | |
| 155 cc_layer->RegisterForAnimations(layer_tree_host_->animation_registrar()); | |
| 156 } | |
| 157 | |
| 158 void WebLayerTreeViewImplForTesting::registerViewportLayers( | 152 void WebLayerTreeViewImplForTesting::registerViewportLayers( |
| 159 const blink::WebLayer* overscrollElasticityLayer, | 153 const blink::WebLayer* overscrollElasticityLayer, |
| 160 const blink::WebLayer* pageScaleLayer, | 154 const blink::WebLayer* pageScaleLayer, |
| 161 const blink::WebLayer* innerViewportScrollLayer, | 155 const blink::WebLayer* innerViewportScrollLayer, |
| 162 const blink::WebLayer* outerViewportScrollLayer) { | 156 const blink::WebLayer* outerViewportScrollLayer) { |
| 163 layer_tree_host_->RegisterViewportLayers( | 157 layer_tree_host_->RegisterViewportLayers( |
| 164 // The scroll elasticity layer will only exist when using pinch virtual | 158 // The scroll elasticity layer will only exist when using pinch virtual |
| 165 // viewports. | 159 // viewports. |
| 166 overscrollElasticityLayer | 160 overscrollElasticityLayer |
| 167 ? static_cast<const cc_blink::WebLayerImpl*>( | 161 ? static_cast<const cc_blink::WebLayerImpl*>( |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( | 207 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( |
| 214 bool have_event_handlers) { | 208 bool have_event_handlers) { |
| 215 layer_tree_host_->SetHaveScrollEventHandlers(have_event_handlers); | 209 layer_tree_host_->SetHaveScrollEventHandlers(have_event_handlers); |
| 216 } | 210 } |
| 217 | 211 |
| 218 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { | 212 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { |
| 219 return layer_tree_host_->have_scroll_event_handlers(); | 213 return layer_tree_host_->have_scroll_event_handlers(); |
| 220 } | 214 } |
| 221 | 215 |
| 222 } // namespace content | 216 } // namespace content |
| OLD | NEW |