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/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/animation.h" | 8 #include "cc/animation/animation.h" |
9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { | 158 void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) { |
159 layer_->SetBackgroundFilters(filters); | 159 layer_->SetBackgroundFilters(filters); |
160 } | 160 } |
161 | 161 |
162 void WebLayerImpl::setFilter(SkImageFilter* filter) { | 162 void WebLayerImpl::setFilter(SkImageFilter* filter) { |
163 SkSafeRef(filter); // Claim a reference for the compositor. | 163 SkSafeRef(filter); // Claim a reference for the compositor. |
164 layer_->SetFilter(skia::AdoptRef(filter)); | 164 layer_->SetFilter(skia::AdoptRef(filter)); |
165 } | 165 } |
166 | 166 |
167 void WebLayerImpl::setDebugName(WebKit::WebString name) { | 167 void WebLayerImpl::setDebugName(WebKit::WebString name) { |
168 layer_->SetDebugName(UTF16ToASCII(string16(name.data(), name.length()))); | 168 layer_->SetDebugName( |
| 169 UTF16ToASCII(base::string16(name.data(), name.length()))); |
169 } | 170 } |
170 | 171 |
171 void WebLayerImpl::setAnimationDelegate( | 172 void WebLayerImpl::setAnimationDelegate( |
172 WebKit::WebAnimationDelegate* delegate) { | 173 WebKit::WebAnimationDelegate* delegate) { |
173 layer_->set_layer_animation_delegate(delegate); | 174 layer_->set_layer_animation_delegate(delegate); |
174 } | 175 } |
175 | 176 |
176 bool WebLayerImpl::addAnimation(WebKit::WebAnimation* animation) { | 177 bool WebLayerImpl::addAnimation(WebKit::WebAnimation* animation) { |
177 return layer_->AddAnimation( | 178 return layer_->AddAnimation( |
178 static_cast<WebAnimationImpl*>(animation)->CloneToAnimation()); | 179 static_cast<WebAnimationImpl*>(animation)->CloneToAnimation()); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 void WebLayerImpl::setScrollClient( | 323 void WebLayerImpl::setScrollClient( |
323 WebKit::WebLayerScrollClient* scroll_client) { | 324 WebKit::WebLayerScrollClient* scroll_client) { |
324 layer_->set_layer_scroll_client(scroll_client); | 325 layer_->set_layer_scroll_client(scroll_client); |
325 } | 326 } |
326 | 327 |
327 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } | 328 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } |
328 | 329 |
329 Layer* WebLayerImpl::layer() const { return layer_.get(); } | 330 Layer* WebLayerImpl::layer() const { return layer_.get(); } |
330 | 331 |
331 } // namespace WebKit | 332 } // namespace WebKit |
OLD | NEW |