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

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

Issue 2767213003: First Implementation of Snapped Points
Patch Set: Rebase and format Created 3 years, 6 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/blink/web_layer_impl.cc ('k') | cc/layers/layer.h » ('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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // room to move the layer in the requested direction, its first ancestor layer 147 // room to move the layer in the requested direction, its first ancestor layer
148 // that can be scrolled will be moved instead. The return value's |did_scroll| 148 // that can be scrolled will be moved instead. The return value's |did_scroll|
149 // field is set to false if no layer can be moved in the requested direction 149 // field is set to false if no layer can be moved in the requested direction
150 // at all, and set to true if any layer is moved. If the scroll delta hits the 150 // at all, and set to true if any layer is moved. If the scroll delta hits the
151 // root layer, and the layer can no longer move, the root overscroll 151 // root layer, and the layer can no longer move, the root overscroll
152 // accumulated within this ScrollBegin() scope is reported in the return 152 // accumulated within this ScrollBegin() scope is reported in the return
153 // value's |accumulated_overscroll| field. Should only be called if 153 // value's |accumulated_overscroll| field. Should only be called if
154 // ScrollBegin() returned SCROLL_STARTED. 154 // ScrollBegin() returned SCROLL_STARTED.
155 virtual InputHandlerScrollResult ScrollBy(ScrollState* scroll_state) = 0; 155 virtual InputHandlerScrollResult ScrollBy(ScrollState* scroll_state) = 0;
156 156
157 virtual void SnapAfterGestureScroll(const gfx::Point&) = 0;
158
159 virtual void FindSnappedOffset(gfx::Vector2dF* snapped_offset,
160 const gfx::Vector2dF& original_offset) = 0;
161
157 // Returns SCROLL_STARTED if a layer was actively being scrolled, 162 // Returns SCROLL_STARTED if a layer was actively being scrolled,
158 // SCROLL_IGNORED if not. 163 // SCROLL_IGNORED if not.
159 virtual ScrollStatus FlingScrollBegin() = 0; 164 virtual ScrollStatus FlingScrollBegin() = 0;
160 165
161 virtual void MouseMoveAt(const gfx::Point& mouse_position) = 0; 166 virtual void MouseMoveAt(const gfx::Point& mouse_position) = 0;
162 virtual void MouseDown() = 0; 167 virtual void MouseDown() = 0;
163 virtual void MouseUp() = 0; 168 virtual void MouseUp() = 0;
164 virtual void MouseLeave() = 0; 169 virtual void MouseLeave() = 0;
165 170
166 // Stop scrolling the selected layer. Should only be called if ScrollBegin() 171 // Stop scrolling the selected layer. Should only be called if ScrollBegin()
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 InputHandler() {} 229 InputHandler() {}
225 virtual ~InputHandler() {} 230 virtual ~InputHandler() {}
226 231
227 private: 232 private:
228 DISALLOW_COPY_AND_ASSIGN(InputHandler); 233 DISALLOW_COPY_AND_ASSIGN(InputHandler);
229 }; 234 };
230 235
231 } // namespace cc 236 } // namespace cc
232 237
233 #endif // CC_INPUT_INPUT_HANDLER_H_ 238 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698