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