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

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix Android/ChromeOS build problems with bit packed enum class Created 4 years, 11 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
OLDNEW
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 323
324 bool WebLayerImpl::userScrollableHorizontal() const { 324 bool WebLayerImpl::userScrollableHorizontal() const {
325 return layer_->user_scrollable_horizontal(); 325 return layer_->user_scrollable_horizontal();
326 } 326 }
327 327
328 bool WebLayerImpl::userScrollableVertical() const { 328 bool WebLayerImpl::userScrollableVertical() const {
329 return layer_->user_scrollable_vertical(); 329 return layer_->user_scrollable_vertical();
330 } 330 }
331 331
332 void WebLayerImpl::setHaveWheelEventHandlers(bool have_wheel_event_handlers) { 332 static_assert(static_cast<cc::EventListenerProperties>(
333 layer_->SetHaveWheelEventHandlers(have_wheel_event_handlers); 333 blink::WebEventListenerProperties::Nothing) ==
334 cc::EventListenerProperties::NONE,
335 "EventListener and WebEventListener enums must match");
336 static_assert(static_cast<cc::EventListenerProperties>(
337 blink::WebEventListenerProperties::Passive) ==
338 cc::EventListenerProperties::PASSIVE,
339 "EventListener and WebEventListener enums must match");
340 static_assert(static_cast<cc::EventListenerProperties>(
341 blink::WebEventListenerProperties::Blocking) ==
342 cc::EventListenerProperties::BLOCKING,
343 "EventListener and WebEventListener enums must match");
344
345 void WebLayerImpl::setTouchEventListenerProperties(
346 blink::WebEventListenerProperties touch_event_properties) {
347 layer_->SetTouchEventProperties(
348 static_cast<cc::EventListenerProperties>(touch_event_properties));
334 } 349 }
335 350
336 bool WebLayerImpl::haveWheelEventHandlers() const { 351 blink::WebEventListenerProperties WebLayerImpl::touchEventListenerProperties()
337 return layer_->have_wheel_event_handlers(); 352 const {
353 return static_cast<blink::WebEventListenerProperties>(
354 layer_->touch_event_properties());
355 }
356
357 void WebLayerImpl::setWheelEventListenerProperties(
358 blink::WebEventListenerProperties wheel_event_properties) {
359 layer_->SetWheelEventProperties(
360 static_cast<cc::EventListenerProperties>(wheel_event_properties));
361 }
362
363 blink::WebEventListenerProperties WebLayerImpl::wheelEventListenerProperties()
364 const {
365 return static_cast<blink::WebEventListenerProperties>(
366 layer_->wheel_event_properties());
338 } 367 }
339 368
340 void WebLayerImpl::setHaveScrollEventHandlers(bool have_scroll_event_handlers) { 369 void WebLayerImpl::setHaveScrollEventHandlers(bool have_scroll_event_handlers) {
341 layer_->SetHaveScrollEventHandlers(have_scroll_event_handlers); 370 layer_->SetHaveScrollEventHandlers(have_scroll_event_handlers);
342 } 371 }
343 372
344 bool WebLayerImpl::haveScrollEventHandlers() const { 373 bool WebLayerImpl::haveScrollEventHandlers() const {
345 return layer_->have_scroll_event_handlers(); 374 return layer_->have_scroll_event_handlers();
346 } 375 }
347 376
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 598
570 Layer* WebLayerImpl::layer() const { 599 Layer* WebLayerImpl::layer() const {
571 return layer_.get(); 600 return layer_.get();
572 } 601 }
573 602
574 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { 603 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) {
575 contents_opaque_is_fixed_ = fixed; 604 contents_opaque_is_fixed_ = fixed;
576 } 605 }
577 606
578 } // namespace cc_blink 607 } // namespace cc_blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698