diff options
author | dtapuska <dtapuska@chromium.org> | 2016-02-05 13:36:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-05 21:36:53 +0000 |
commit | f206a40dcff89bf50517b1b4e109c25c277bad43 (patch) | |
tree | f9166c0d889fc3f82c0fbb51ec8e79150cd393c6 /cc/input | |
parent | e674fac322ad46a261ee6e9b4d1b40ee3c3958f2 (diff) | |
download | chromium_src-f206a40dcff89bf50517b1b4e109c25c277bad43.zip chromium_src-f206a40dcff89bf50517b1b4e109c25c277bad43.tar.gz chromium_src-f206a40dcff89bf50517b1b4e109c25c277bad43.tar.bz2 |
Communicate whether passive event listeners exist to cc.
cc does nothing with these new fields being set other than plumbing them
through the pipeline to be later queried on the layer_impl.
Add an additional field whether touch event listeners exist on the layer
(which unfortunately is effectively implement as an entire document field
in the blink EventListenerRegistry; this can be improved). There still
exists TouchRegionRects that indicate the areas of blocking event
listeners; but whether a passive event listener exists will be indicated
in this field. It is intended that this model will be replicated
with property trees when it is ready.
BUG=489802
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1577263004
Cr-Commit-Position: refs/heads/master@{#373915}
Diffstat (limited to 'cc/input')
-rw-r--r-- | cc/input/event_listener_properties.h | 16 | ||||
-rw-r--r-- | cc/input/input_handler.h | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/cc/input/event_listener_properties.h b/cc/input/event_listener_properties.h new file mode 100644 index 0000000..2755c6e --- /dev/null +++ b/cc/input/event_listener_properties.h @@ -0,0 +1,16 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_INPUT_EVENT_LISTENER_PROPERTIES_H_ +#define CC_INPUT_EVENT_LISTENER_PROPERTIES_H_ + +namespace cc { + +enum class EventListenerClass { kTouch, kMouseWheel, kNumClasses }; + +enum class EventListenerProperties { kNone, kPassive, kBlocking, kMax }; + +} // namespace cc + +#endif // CC_INPUT_EVENT_LISTENER_PROPERTIES_H_ diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h index 449c471..9a39562 100644 --- a/cc/input/input_handler.h +++ b/cc/input/input_handler.h @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "cc/base/cc_export.h" +#include "cc/input/event_listener_properties.h" #include "cc/input/main_thread_scrolling_reason.h" #include "cc/input/scroll_state.h" #include "cc/input/scrollbar.h" @@ -170,7 +171,8 @@ class CC_EXPORT InputHandler { virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, ScrollInputType type) const = 0; - virtual bool HaveWheelEventHandlers() const = 0; + virtual EventListenerProperties GetEventListenerProperties( + EventListenerClass event_class) const = 0; // Whether the page should be given the opportunity to suppress scrolling by // consuming touch events that started at |viewport_point|. |