Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: content/test/web_layer_tree_view_impl_for_testing.cc

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of extracted changes. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698