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 | |
169 void WebLayerTreeViewImplForTesting::registerViewportLayers( | 162 void WebLayerTreeViewImplForTesting::registerViewportLayers( |
170 const blink::WebLayer* overscrollElasticityLayer, | 163 const blink::WebLayer* overscrollElasticityLayer, |
171 const blink::WebLayer* pageScaleLayer, | 164 const blink::WebLayer* pageScaleLayer, |
172 const blink::WebLayer* innerViewportScrollLayer, | 165 const blink::WebLayer* innerViewportScrollLayer, |
173 const blink::WebLayer* outerViewportScrollLayer) { | 166 const blink::WebLayer* outerViewportScrollLayer) { |
174 layer_tree_host_->RegisterViewportLayers( | 167 layer_tree_host_->RegisterViewportLayers( |
175 // The scroll elasticity layer will only exist when using pinch virtual | 168 // The scroll elasticity layer will only exist when using pinch virtual |
176 // viewports. | 169 // viewports. |
177 overscrollElasticityLayer | 170 overscrollElasticityLayer |
178 ? static_cast<const cc_blink::WebLayerImpl*>( | 171 ? static_cast<const cc_blink::WebLayerImpl*>( |
(...skipping 18 matching lines...) Expand all Loading... |
197 } | 190 } |
198 | 191 |
199 void WebLayerTreeViewImplForTesting::registerSelection( | 192 void WebLayerTreeViewImplForTesting::registerSelection( |
200 const blink::WebSelection& selection) { | 193 const blink::WebSelection& selection) { |
201 } | 194 } |
202 | 195 |
203 void WebLayerTreeViewImplForTesting::clearSelection() { | 196 void WebLayerTreeViewImplForTesting::clearSelection() { |
204 } | 197 } |
205 | 198 |
206 } // namespace content | 199 } // namespace content |
OLD | NEW |