Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 // Similar to ScrollBegin, except the hit test is skipped and scroll always | 121 // Similar to ScrollBegin, except the hit test is skipped and scroll always |
| 122 // targets at the root layer. | 122 // targets at the root layer. |
| 123 virtual ScrollStatus RootScrollBegin(ScrollState* scroll_state, | 123 virtual ScrollStatus RootScrollBegin(ScrollState* scroll_state, |
| 124 ScrollInputType type) = 0; | 124 ScrollInputType type) = 0; |
| 125 | 125 |
| 126 // Returns SCROLL_ON_IMPL_THREAD if a layer is actively being scrolled or | 126 // Returns SCROLL_ON_IMPL_THREAD if a layer is actively being scrolled or |
| 127 // a subsequent call to ScrollAnimated can begin on the impl thread. | 127 // a subsequent call to ScrollAnimated can begin on the impl thread. |
| 128 virtual ScrollStatus ScrollAnimatedBegin( | 128 virtual ScrollStatus ScrollAnimatedBegin( |
| 129 const gfx::Point& viewport_point) = 0; | 129 const gfx::Point& viewport_point) = 0; |
| 130 | 130 |
| 131 // Returns SCROLL_ON_IMPL_THREAD if an animation is initiated on the impl | |
| 132 // thread. delayed_by is the delay that is taken into account when determining | |
| 133 // the duration of the animation. | |
|
tdresser
2016/08/25 15:55:54
More importantly, it determines the start time of
ymalik
2016/08/29 14:52:05
Not quite, since the animation will still start at
| |
| 131 virtual ScrollStatus ScrollAnimated(const gfx::Point& viewport_point, | 134 virtual ScrollStatus ScrollAnimated(const gfx::Point& viewport_point, |
| 132 const gfx::Vector2dF& scroll_delta) = 0; | 135 const gfx::Vector2dF& scroll_delta, |
| 136 base::TimeDelta delayed_by) = 0; | |
| 133 | 137 |
| 134 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta. | 138 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta. |
| 135 // Internally, the delta is transformed to local layer's coordinate space for | 139 // Internally, the delta is transformed to local layer's coordinate space for |
| 136 // scrolls gestures that are direct manipulation (e.g. touch). If there is no | 140 // scrolls gestures that are direct manipulation (e.g. touch). If there is no |
| 137 // room to move the layer in the requested direction, its first ancestor layer | 141 // room to move the layer in the requested direction, its first ancestor layer |
| 138 // that can be scrolled will be moved instead. The return value's |did_scroll| | 142 // that can be scrolled will be moved instead. The return value's |did_scroll| |
| 139 // field is set to false if no layer can be moved in the requested direction | 143 // field is set to false if no layer can be moved in the requested direction |
| 140 // at all, and set to true if any layer is moved. If the scroll delta hits the | 144 // at all, and set to true if any layer is moved. If the scroll delta hits the |
| 141 // root layer, and the layer can no longer move, the root overscroll | 145 // root layer, and the layer can no longer move, the root overscroll |
| 142 // accumulated within this ScrollBegin() scope is reported in the return | 146 // accumulated within this ScrollBegin() scope is reported in the return |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 InputHandler() {} | 212 InputHandler() {} |
| 209 virtual ~InputHandler() {} | 213 virtual ~InputHandler() {} |
| 210 | 214 |
| 211 private: | 215 private: |
| 212 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 216 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 213 }; | 217 }; |
| 214 | 218 |
| 215 } // namespace cc | 219 } // namespace cc |
| 216 | 220 |
| 217 #endif // CC_INPUT_INPUT_HANDLER_H_ | 221 #endif // CC_INPUT_INPUT_HANDLER_H_ |
| OLD | NEW |