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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 ScrollInputType type) = 0; | 125 ScrollInputType type) = 0; |
| 126 | 126 |
| 127 // Returns SCROLL_ON_IMPL_THREAD if a layer is actively being scrolled or | 127 // Returns SCROLL_ON_IMPL_THREAD if a layer is actively being scrolled or |
| 128 // a subsequent call to ScrollAnimated can begin on the impl thread. | 128 // a subsequent call to ScrollAnimated can begin on the impl thread. |
| 129 virtual ScrollStatus ScrollAnimatedBegin( | 129 virtual ScrollStatus ScrollAnimatedBegin( |
| 130 const gfx::Point& viewport_point) = 0; | 130 const gfx::Point& viewport_point) = 0; |
| 131 | 131 |
| 132 virtual ScrollStatus ScrollAnimated(const gfx::Point& viewport_point, | 132 virtual ScrollStatus ScrollAnimated(const gfx::Point& viewport_point, |
| 133 const gfx::Vector2dF& scroll_delta) = 0; | 133 const gfx::Vector2dF& scroll_delta) = 0; |
| 134 | 134 |
| 135 virtual void AdjustDuration(base::TimeDelta) = 0; | |
|
skobes
2016/06/08 22:47:28
I don't think we should ever adjust the duration a
| |
| 136 | |
| 135 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta. | 137 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta. |
| 136 // Internally, the delta is transformed to local layer's coordinate space for | 138 // Internally, the delta is transformed to local layer's coordinate space for |
| 137 // scrolls gestures that are direct manipulation (e.g. touch). If there is no | 139 // scrolls gestures that are direct manipulation (e.g. touch). If there is no |
| 138 // room to move the layer in the requested direction, its first ancestor layer | 140 // room to move the layer in the requested direction, its first ancestor layer |
| 139 // that can be scrolled will be moved instead. The return value's |did_scroll| | 141 // that can be scrolled will be moved instead. The return value's |did_scroll| |
| 140 // field is set to false if no layer can be moved in the requested direction | 142 // field is set to false if no layer can be moved in the requested direction |
| 141 // at all, and set to true if any layer is moved. If the scroll delta hits the | 143 // at all, and set to true if any layer is moved. If the scroll delta hits the |
| 142 // root layer, and the layer can no longer move, the root overscroll | 144 // root layer, and the layer can no longer move, the root overscroll |
| 143 // accumulated within this ScrollBegin() scope is reported in the return | 145 // accumulated within this ScrollBegin() scope is reported in the return |
| 144 // value's |accumulated_overscroll| field. Should only be called if | 146 // value's |accumulated_overscroll| field. Should only be called if |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 InputHandler() {} | 205 InputHandler() {} |
| 204 virtual ~InputHandler() {} | 206 virtual ~InputHandler() {} |
| 205 | 207 |
| 206 private: | 208 private: |
| 207 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 209 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 208 }; | 210 }; |
| 209 | 211 |
| 210 } // namespace cc | 212 } // namespace cc |
| 211 | 213 |
| 212 #endif // CC_INPUT_INPUT_HANDLER_H_ | 214 #endif // CC_INPUT_INPUT_HANDLER_H_ |
| OLD | NEW |