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

Unified Diff: cc/trees/layer_tree_impl.h

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: Rebase Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_impl.h
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 7f4c89c955967d44b6fd827c856fc5345587e69a..56140350b2d03c17ef281c7bb9d313fed7028a61 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/values.h"
#include "cc/base/synced_property.h"
+#include "cc/input/event_listener_properties.h"
#include "cc/input/layer_selection_bound.h"
#include "cc/layers/layer_impl.h"
#include "cc/output/begin_frame_args.h"
@@ -443,9 +444,14 @@ class CC_EXPORT LayerTreeImpl {
have_scroll_event_handlers_ = have_event_handlers;
}
- bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; }
- void set_have_wheel_event_handlers(bool have_event_handlers) {
- have_wheel_event_handlers_ = have_event_handlers;
+ EventListenerProperties event_listener_properties(
+ EventListenerClass event_class) const {
+ return event_listener_properties_[static_cast<size_t>(event_class)];
+ }
+ void set_event_listener_properties(EventListenerClass event_class,
+ EventListenerProperties event_properties) {
+ event_listener_properties_[static_cast<size_t>(event_class)] =
+ event_properties;
}
protected:
@@ -536,7 +542,8 @@ class CC_EXPORT LayerTreeImpl {
int render_surface_layer_list_id_;
bool have_scroll_event_handlers_;
- bool have_wheel_event_handlers_;
+ EventListenerProperties event_listener_properties_[static_cast<size_t>(
+ EventListenerClass::kNumClasses)];
// Whether or not Blink's viewport size was shrunk by the height of the top
// controls at the time of the last layout.

Powered by Google App Engine
This is Rietveld 408576698