diff options
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|. |