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

Side by Side Diff: webkit/compositor_bindings/web_layer_impl.cc

Issue 12517003: cc: Chromify the Animation and LayerAnimationController classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "webkit/compositor_bindings/web_layer_impl.h" 5 #include "webkit/compositor_bindings/web_layer_impl.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "cc/animation.h" 8 #include "cc/animation.h"
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 #include "cc/region.h" 10 #include "cc/region.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 void WebLayerImpl::setDebugName(WebString name) { 172 void WebLayerImpl::setDebugName(WebString name) {
173 layer_->setDebugName(UTF16ToASCII(string16(name.data(), name.length()))); 173 layer_->setDebugName(UTF16ToASCII(string16(name.data(), name.length())));
174 } 174 }
175 175
176 void WebLayerImpl::setAnimationDelegate(WebAnimationDelegate* delegate) { 176 void WebLayerImpl::setAnimationDelegate(WebAnimationDelegate* delegate) {
177 layer_->setLayerAnimationDelegate(delegate); 177 layer_->setLayerAnimationDelegate(delegate);
178 } 178 }
179 179
180 bool WebLayerImpl::addAnimation(WebAnimation* animation) { 180 bool WebLayerImpl::addAnimation(WebAnimation* animation) {
181 return layer_->addAnimation(static_cast<WebAnimationImpl*>(animation) 181 return layer_->AddAnimation(
182 ->cloneToAnimation()); 182 static_cast<WebAnimationImpl*>(animation)->cloneToAnimation());
183 } 183 }
184 184
185 void WebLayerImpl::removeAnimation(int animation_id) { 185 void WebLayerImpl::removeAnimation(int animation_id) {
186 layer_->removeAnimation(animation_id); 186 layer_->RemoveAnimation(animation_id);
187 } 187 }
188 188
189 void WebLayerImpl::removeAnimation( 189 void WebLayerImpl::removeAnimation(
190 int animation_id, 190 int animation_id,
191 WebAnimation::TargetProperty target_property) { 191 WebAnimation::TargetProperty target_property) {
192 layer_->layerAnimationController() 192 layer_->layerAnimationController()->RemoveAnimation(
193 ->removeAnimation( 193 animation_id,
194 animation_id, 194 static_cast<Animation::TargetProperty>(target_property));
195 static_cast<Animation::TargetProperty>(target_property));
196 } 195 }
197 196
198 void WebLayerImpl::pauseAnimation(int animation_id, double time_offset) { 197 void WebLayerImpl::pauseAnimation(int animation_id, double time_offset) {
199 layer_->pauseAnimation(animation_id, time_offset); 198 layer_->PauseAnimation(animation_id, time_offset);
200 } 199 }
201 200
202 void WebLayerImpl::suspendAnimations(double monotonic_time) { 201 void WebLayerImpl::suspendAnimations(double monotonic_time) {
203 layer_->suspendAnimations(monotonic_time); 202 layer_->suspendAnimations(monotonic_time);
204 } 203 }
205 204
206 void WebLayerImpl::resumeAnimations(double monotonic_time) { 205 void WebLayerImpl::resumeAnimations(double monotonic_time) {
207 layer_->resumeAnimations(monotonic_time); 206 layer_->resumeAnimations(monotonic_time);
208 } 207 }
209 208
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 return layer_->fixedToContainerLayer(); 323 return layer_->fixedToContainerLayer();
325 } 324 }
326 325
327 void WebLayerImpl::setScrollClient(WebLayerScrollClient* scroll_client) { 326 void WebLayerImpl::setScrollClient(WebLayerScrollClient* scroll_client) {
328 layer_->setLayerScrollClient(scroll_client); 327 layer_->setLayerScrollClient(scroll_client);
329 } 328 }
330 329
331 Layer* WebLayerImpl::layer() const { return layer_.get(); } 330 Layer* WebLayerImpl::layer() const { return layer_.get(); }
332 331
333 } // namespace WebKit 332 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698