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

Side by Side Diff: cc/input/input_handler.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: Fix nits 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 unified diff | Download patch
« no previous file with comments | « cc/input/event_listener_properties.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef CC_INPUT_INPUT_HANDLER_H_ 5 #ifndef CC_INPUT_INPUT_HANDLER_H_
6 #define CC_INPUT_INPUT_HANDLER_H_ 6 #define CC_INPUT_INPUT_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/input/event_listener_properties.h"
12 #include "cc/input/main_thread_scrolling_reason.h" 13 #include "cc/input/main_thread_scrolling_reason.h"
13 #include "cc/input/scroll_state.h" 14 #include "cc/input/scroll_state.h"
14 #include "cc/input/scrollbar.h" 15 #include "cc/input/scrollbar.h"
15 #include "cc/trees/swap_promise_monitor.h" 16 #include "cc/trees/swap_promise_monitor.h"
16 17
17 namespace gfx { 18 namespace gfx {
18 class Point; 19 class Point;
19 class PointF; 20 class PointF;
20 class ScrollOffset; 21 class ScrollOffset;
21 class SizeF; 22 class SizeF;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Request another callback to InputHandlerClient::Animate(). 164 // Request another callback to InputHandlerClient::Animate().
164 virtual void SetNeedsAnimateInput() = 0; 165 virtual void SetNeedsAnimateInput() = 0;
165 166
166 // Returns true if there is an active scroll on the inner viewport layer. 167 // Returns true if there is an active scroll on the inner viewport layer.
167 virtual bool IsCurrentlyScrollingInnerViewport() const = 0; 168 virtual bool IsCurrentlyScrollingInnerViewport() const = 0;
168 169
169 // Whether the layer under |viewport_point| is the currently scrolling layer. 170 // Whether the layer under |viewport_point| is the currently scrolling layer.
170 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, 171 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point,
171 ScrollInputType type) const = 0; 172 ScrollInputType type) const = 0;
172 173
173 virtual bool HaveWheelEventHandlers() const = 0; 174 virtual EventListenerProperties GetEventListenerProperties(
175 EventListenerClass event_class) const = 0;
174 176
175 // Whether the page should be given the opportunity to suppress scrolling by 177 // Whether the page should be given the opportunity to suppress scrolling by
176 // consuming touch events that started at |viewport_point|. 178 // consuming touch events that started at |viewport_point|.
177 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; 179 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0;
178 180
179 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped 181 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped
180 // LatencyInfoSwapPromiseMonitor. During the life time of the 182 // LatencyInfoSwapPromiseMonitor. During the life time of the
181 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() 183 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect()
182 // is called on LayerTreeHostImpl, the original latency info will be turned 184 // is called on LayerTreeHostImpl, the original latency info will be turned
183 // into a LatencyInfoSwapPromise. 185 // into a LatencyInfoSwapPromise.
184 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( 186 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
185 ui::LatencyInfo* latency) = 0; 187 ui::LatencyInfo* latency) = 0;
186 188
187 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; 189 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0;
188 190
189 protected: 191 protected:
190 InputHandler() {} 192 InputHandler() {}
191 virtual ~InputHandler() {} 193 virtual ~InputHandler() {}
192 194
193 private: 195 private:
194 DISALLOW_COPY_AND_ASSIGN(InputHandler); 196 DISALLOW_COPY_AND_ASSIGN(InputHandler);
195 }; 197 };
196 198
197 } // namespace cc 199 } // namespace cc
198 200
199 #endif // CC_INPUT_INPUT_HANDLER_H_ 201 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « cc/input/event_listener_properties.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698