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

Side by Side Diff: cc/input/input_handler.h

Issue 2471523002: Make touch events uncancelable during fling when they are on the current active scroll layer (Closed)
Patch Set: fling layer Created 4 years, 1 month 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 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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Returns true if there is an active scroll on the viewport. 181 // Returns true if there is an active scroll on the viewport.
182 virtual bool IsCurrentlyScrollingViewport() const = 0; 182 virtual bool IsCurrentlyScrollingViewport() const = 0;
183 183
184 // Whether the layer under |viewport_point| is the currently scrolling layer. 184 // Whether the layer under |viewport_point| is the currently scrolling layer.
185 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, 185 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point,
186 ScrollInputType type) const = 0; 186 ScrollInputType type) const = 0;
187 187
188 virtual EventListenerProperties GetEventListenerProperties( 188 virtual EventListenerProperties GetEventListenerProperties(
189 EventListenerClass event_class) const = 0; 189 EventListenerClass event_class) const = 0;
190 190
191 // Whether the page should be given the opportunity to suppress scrolling by 191 // It returns the type of event listener at the given viewport point. Such as
192 // consuming touch events that started at |viewport_point|. 192 // if the page has a touch handler or not, and whether the page should
193 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; 193 // suppress scrolling by consuming touch events that started at
194 // |viewport_point|.
195 virtual EventListenerProperties EventListenerTypeForTouchStartAt(
196 const gfx::Point& viewport_point) = 0;
194 197
195 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped 198 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped
196 // LatencyInfoSwapPromiseMonitor. During the life time of the 199 // LatencyInfoSwapPromiseMonitor. During the life time of the
197 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() 200 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect()
198 // is called on LayerTreeHostImpl, the original latency info will be turned 201 // is called on LayerTreeHostImpl, the original latency info will be turned
199 // into a LatencyInfoSwapPromise. 202 // into a LatencyInfoSwapPromise.
200 virtual std::unique_ptr<SwapPromiseMonitor> 203 virtual std::unique_ptr<SwapPromiseMonitor>
201 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0; 204 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0;
202 205
203 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; 206 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0;
204 207
205 // Called by the single-threaded UI Compositor to get or set the scroll offset 208 // Called by the single-threaded UI Compositor to get or set the scroll offset
206 // on the impl side. Retruns false if |layer_id| isn't in the active tree. 209 // on the impl side. Retruns false if |layer_id| isn't in the active tree.
207 virtual bool GetScrollOffsetForLayer(int layer_id, 210 virtual bool GetScrollOffsetForLayer(int layer_id,
208 gfx::ScrollOffset* offset) = 0; 211 gfx::ScrollOffset* offset) = 0;
209 virtual bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) = 0; 212 virtual bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) = 0;
210 213
211 protected: 214 protected:
212 InputHandler() {} 215 InputHandler() {}
213 virtual ~InputHandler() {} 216 virtual ~InputHandler() {}
214 217
215 private: 218 private:
216 DISALLOW_COPY_AND_ASSIGN(InputHandler); 219 DISALLOW_COPY_AND_ASSIGN(InputHandler);
217 }; 220 };
218 221
219 } // namespace cc 222 } // namespace cc
220 223
221 #endif // CC_INPUT_INPUT_HANDLER_H_ 224 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698