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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 WebSize WebLayerImpl::maxScrollPosition() const { | 244 WebSize WebLayerImpl::maxScrollPosition() const { |
245 return layer_->max_scroll_offset(); | 245 return layer_->max_scroll_offset(); |
246 } | 246 } |
247 | 247 |
248 void WebLayerImpl::setScrollable(bool scrollable) { | 248 void WebLayerImpl::setScrollable(bool scrollable) { |
249 layer_->SetScrollable(scrollable); | 249 layer_->SetScrollable(scrollable); |
250 } | 250 } |
251 | 251 |
252 bool WebLayerImpl::scrollable() const { return layer_->scrollable(); } | 252 bool WebLayerImpl::scrollable() const { return layer_->scrollable(); } |
253 | 253 |
| 254 void WebLayerImpl::setUserScrollable(bool horizontal, bool vertical) { |
| 255 layer_->SetUserScrollable(horizontal, vertical); |
| 256 } |
| 257 |
| 258 bool WebLayerImpl::userScrollableHorizontal() const { |
| 259 return layer_->user_scrollable_horizontal(); |
| 260 } |
| 261 |
| 262 bool WebLayerImpl::userScrollableVertical() const { |
| 263 return layer_->user_scrollable_vertical(); |
| 264 } |
| 265 |
254 void WebLayerImpl::setHaveWheelEventHandlers(bool have_wheel_event_handlers) { | 266 void WebLayerImpl::setHaveWheelEventHandlers(bool have_wheel_event_handlers) { |
255 layer_->SetHaveWheelEventHandlers(have_wheel_event_handlers); | 267 layer_->SetHaveWheelEventHandlers(have_wheel_event_handlers); |
256 } | 268 } |
257 | 269 |
258 bool WebLayerImpl::haveWheelEventHandlers() const { | 270 bool WebLayerImpl::haveWheelEventHandlers() const { |
259 return layer_->have_wheel_event_handlers(); | 271 return layer_->have_wheel_event_handlers(); |
260 } | 272 } |
261 | 273 |
262 void WebLayerImpl::setShouldScrollOnMainThread( | 274 void WebLayerImpl::setShouldScrollOnMainThread( |
263 bool should_scroll_on_main_thread) { | 275 bool should_scroll_on_main_thread) { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 void WebLayerImpl::setClipParent(WebKit::WebLayer* parent) { | 401 void WebLayerImpl::setClipParent(WebKit::WebLayer* parent) { |
390 cc::Layer* clip_parent = NULL; | 402 cc::Layer* clip_parent = NULL; |
391 if (parent) | 403 if (parent) |
392 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); | 404 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); |
393 layer_->SetClipParent(clip_parent); | 405 layer_->SetClipParent(clip_parent); |
394 } | 406 } |
395 | 407 |
396 Layer* WebLayerImpl::layer() const { return layer_.get(); } | 408 Layer* WebLayerImpl::layer() const { return layer_.get(); } |
397 | 409 |
398 } // namespace webkit | 410 } // namespace webkit |
OLD | NEW |