| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/blink/web_layer_impl.h" | 5 #include "cc/blink/web_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 320 } |
| 321 | 321 |
| 322 bool WebLayerImpl::userScrollableHorizontal() const { | 322 bool WebLayerImpl::userScrollableHorizontal() const { |
| 323 return layer_->user_scrollable_horizontal(); | 323 return layer_->user_scrollable_horizontal(); |
| 324 } | 324 } |
| 325 | 325 |
| 326 bool WebLayerImpl::userScrollableVertical() const { | 326 bool WebLayerImpl::userScrollableVertical() const { |
| 327 return layer_->user_scrollable_vertical(); | 327 return layer_->user_scrollable_vertical(); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void WebLayerImpl::setHaveWheelEventHandlers(bool have_wheel_event_handlers) { | 330 static_assert( |
| 331 layer_->SetHaveWheelEventHandlers(have_wheel_event_handlers); | 331 static_cast<uint32_t>(blink::WebEventListenerProperties::Nothing) == |
| 332 cc::EventListenerProperties::kNone, |
| 333 "EventListener and WebEventListener enums must match"); |
| 334 static_assert( |
| 335 static_cast<uint32_t>(blink::WebEventListenerProperties::Passive) == |
| 336 cc::EventListenerProperties::kPassive, |
| 337 "EventListener and WebEventListener enums must match"); |
| 338 static_assert( |
| 339 static_cast<uint32_t>(blink::WebEventListenerProperties::Blocking) == |
| 340 cc::EventListenerProperties::kBlocking, |
| 341 "EventListener and WebEventListener enums must match"); |
| 342 |
| 343 void WebLayerImpl::setTouchEventListenerProperties( |
| 344 blink::WebEventListenerProperties touch_event_properties) { |
| 345 layer_->SetTouchEventProperties( |
| 346 static_cast<uint32_t>(touch_event_properties)); |
| 332 } | 347 } |
| 333 | 348 |
| 334 bool WebLayerImpl::haveWheelEventHandlers() const { | 349 blink::WebEventListenerProperties WebLayerImpl::touchEventListenerProperties() |
| 335 return layer_->have_wheel_event_handlers(); | 350 const { |
| 351 return static_cast<blink::WebEventListenerProperties>( |
| 352 layer_->touch_event_properties()); |
| 353 } |
| 354 |
| 355 void WebLayerImpl::setWheelEventListenerProperties( |
| 356 blink::WebEventListenerProperties wheel_event_properties) { |
| 357 layer_->SetWheelEventProperties( |
| 358 static_cast<uint32_t>(wheel_event_properties)); |
| 359 } |
| 360 |
| 361 blink::WebEventListenerProperties WebLayerImpl::wheelEventListenerProperties() |
| 362 const { |
| 363 return static_cast<blink::WebEventListenerProperties>( |
| 364 layer_->wheel_event_properties()); |
| 336 } | 365 } |
| 337 | 366 |
| 338 void WebLayerImpl::setHaveScrollEventHandlers(bool have_scroll_event_handlers) { | 367 void WebLayerImpl::setHaveScrollEventHandlers(bool have_scroll_event_handlers) { |
| 339 layer_->SetHaveScrollEventHandlers(have_scroll_event_handlers); | 368 layer_->SetHaveScrollEventHandlers(have_scroll_event_handlers); |
| 340 } | 369 } |
| 341 | 370 |
| 342 bool WebLayerImpl::haveScrollEventHandlers() const { | 371 bool WebLayerImpl::haveScrollEventHandlers() const { |
| 343 return layer_->have_scroll_event_handlers(); | 372 return layer_->have_scroll_event_handlers(); |
| 344 } | 373 } |
| 345 | 374 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 | 578 |
| 550 Layer* WebLayerImpl::layer() const { | 579 Layer* WebLayerImpl::layer() const { |
| 551 return layer_.get(); | 580 return layer_.get(); |
| 552 } | 581 } |
| 553 | 582 |
| 554 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { | 583 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { |
| 555 contents_opaque_is_fixed_ = fixed; | 584 contents_opaque_is_fixed_ = fixed; |
| 556 } | 585 } |
| 557 | 586 |
| 558 } // namespace cc_blink | 587 } // namespace cc_blink |
| OLD | NEW |