| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // targets at the root layer. | 123 // targets at the root layer. |
| 124 virtual ScrollStatus RootScrollBegin(ScrollState* scroll_state, | 124 virtual ScrollStatus RootScrollBegin(ScrollState* scroll_state, |
| 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, |
| 134 const ui::LatencyInfo* latency) = 0; |
| 134 | 135 |
| 135 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta. | 136 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta. |
| 136 // Internally, the delta is transformed to local layer's coordinate space for | 137 // 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 | 138 // 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 | 139 // 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| | 140 // 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 | 141 // 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 | 142 // 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 | 143 // root layer, and the layer can no longer move, the root overscroll |
| 143 // accumulated within this ScrollBegin() scope is reported in the return | 144 // accumulated within this ScrollBegin() scope is reported in the return |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 InputHandler() {} | 204 InputHandler() {} |
| 204 virtual ~InputHandler() {} | 205 virtual ~InputHandler() {} |
| 205 | 206 |
| 206 private: | 207 private: |
| 207 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 208 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 208 }; | 209 }; |
| 209 | 210 |
| 210 } // namespace cc | 211 } // namespace cc |
| 211 | 212 |
| 212 #endif // CC_INPUT_INPUT_HANDLER_H_ | 213 #endif // CC_INPUT_INPUT_HANDLER_H_ |
| OLD | NEW |