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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bool flipped_output_surface = false; | 155 bool flipped_output_surface = false; |
156 layer_tree_host_->SetOutputSurface( | 156 layer_tree_host_->SetOutputSurface( |
157 make_scoped_ptr(new cc::PixelTestOutputSurface( | 157 make_scoped_ptr(new cc::PixelTestOutputSurface( |
158 cc::TestContextProvider::Create(), flipped_output_surface))); | 158 cc::TestContextProvider::Create(), flipped_output_surface))); |
159 } | 159 } |
160 | 160 |
161 void WebLayerTreeViewImplForTesting::DidFailToInitializeOutputSurface() { | 161 void WebLayerTreeViewImplForTesting::DidFailToInitializeOutputSurface() { |
162 RequestNewOutputSurface(); | 162 RequestNewOutputSurface(); |
163 } | 163 } |
164 | 164 |
| 165 void WebLayerTreeViewImplForTesting::registerForAnimations( |
| 166 blink::WebLayer* layer) { |
| 167 cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); |
| 168 cc_layer->RegisterForAnimations(layer_tree_host_->animation_registrar()); |
| 169 } |
| 170 |
165 void WebLayerTreeViewImplForTesting::registerViewportLayers( | 171 void WebLayerTreeViewImplForTesting::registerViewportLayers( |
166 const blink::WebLayer* overscrollElasticityLayer, | 172 const blink::WebLayer* overscrollElasticityLayer, |
167 const blink::WebLayer* pageScaleLayer, | 173 const blink::WebLayer* pageScaleLayer, |
168 const blink::WebLayer* innerViewportScrollLayer, | 174 const blink::WebLayer* innerViewportScrollLayer, |
169 const blink::WebLayer* outerViewportScrollLayer) { | 175 const blink::WebLayer* outerViewportScrollLayer) { |
170 layer_tree_host_->RegisterViewportLayers( | 176 layer_tree_host_->RegisterViewportLayers( |
171 // The scroll elasticity layer will only exist when using pinch virtual | 177 // The scroll elasticity layer will only exist when using pinch virtual |
172 // viewports. | 178 // viewports. |
173 overscrollElasticityLayer | 179 overscrollElasticityLayer |
174 ? static_cast<const cc_blink::WebLayerImpl*>( | 180 ? static_cast<const cc_blink::WebLayerImpl*>( |
(...skipping 18 matching lines...) Expand all Loading... |
193 } | 199 } |
194 | 200 |
195 void WebLayerTreeViewImplForTesting::registerSelection( | 201 void WebLayerTreeViewImplForTesting::registerSelection( |
196 const blink::WebSelection& selection) { | 202 const blink::WebSelection& selection) { |
197 } | 203 } |
198 | 204 |
199 void WebLayerTreeViewImplForTesting::clearSelection() { | 205 void WebLayerTreeViewImplForTesting::clearSelection() { |
200 } | 206 } |
201 | 207 |
202 } // namespace content | 208 } // namespace content |
OLD | NEW |