OLD | NEW |
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/renderer/compositor_bindings/web_layer_impl.h" | 5 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "cc/animation/animation.h" | 9 #include "cc/animation/animation.h" |
10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 void WebLayerImpl::setAnimationDelegate( | 190 void WebLayerImpl::setAnimationDelegate( |
191 WebKit::WebAnimationDelegate* delegate) { | 191 WebKit::WebAnimationDelegate* delegate) { |
192 animation_delegate_adapter_.reset( | 192 animation_delegate_adapter_.reset( |
193 new WebToCCAnimationDelegateAdapter(delegate)); | 193 new WebToCCAnimationDelegateAdapter(delegate)); |
194 layer_->set_layer_animation_delegate(animation_delegate_adapter_.get()); | 194 layer_->set_layer_animation_delegate(animation_delegate_adapter_.get()); |
195 } | 195 } |
196 | 196 |
197 bool WebLayerImpl::addAnimation(WebKit::WebAnimation* animation) { | 197 bool WebLayerImpl::addAnimation(WebKit::WebAnimation* animation) { |
198 return layer_->AddAnimation( | 198 return layer_->AddAnimation( |
199 static_cast<WebAnimationImpl*>(animation)->CloneToAnimation()); | 199 static_cast<WebAnimationImpl*>(animation)->PassAnimation()); |
200 } | 200 } |
201 | 201 |
202 void WebLayerImpl::removeAnimation(int animation_id) { | 202 void WebLayerImpl::removeAnimation(int animation_id) { |
203 layer_->RemoveAnimation(animation_id); | 203 layer_->RemoveAnimation(animation_id); |
204 } | 204 } |
205 | 205 |
206 void WebLayerImpl::removeAnimation( | 206 void WebLayerImpl::removeAnimation( |
207 int animation_id, | 207 int animation_id, |
208 WebKit::WebAnimation::TargetProperty target_property) { | 208 WebKit::WebAnimation::TargetProperty target_property) { |
209 layer_->layer_animation_controller()->RemoveAnimation( | 209 layer_->layer_animation_controller()->RemoveAnimation( |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 void WebLayerImpl::setClipParent(WebKit::WebLayer* parent) { | 389 void WebLayerImpl::setClipParent(WebKit::WebLayer* parent) { |
390 cc::Layer* clip_parent = NULL; | 390 cc::Layer* clip_parent = NULL; |
391 if (parent) | 391 if (parent) |
392 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); | 392 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); |
393 layer_->SetClipParent(clip_parent); | 393 layer_->SetClipParent(clip_parent); |
394 } | 394 } |
395 | 395 |
396 Layer* WebLayerImpl::layer() const { return layer_.get(); } | 396 Layer* WebLayerImpl::layer() const { return layer_.get(); } |
397 | 397 |
398 } // namespace webkit | 398 } // namespace webkit |
OLD | NEW |