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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/base/swap_promise_monitor.h" | 12 #include "cc/base/swap_promise_monitor.h" |
| 13 #include "cc/input/scrollbar.h" | 13 #include "cc/input/scrollbar.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Point; | 16 class Point; |
| 17 class PointF; | 17 class PointF; |
| 18 class Vector2d; | 18 class Vector2d; |
| 19 class Vector2dF; | 19 class Vector2dF; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace ui { struct LatencyInfo; } | 22 namespace ui { struct LatencyInfo; } |
| 23 | 23 |
| 24 namespace cc { | 24 namespace cc { |
| 25 | 25 |
| 26 class LayerScrollOffsetDelegate; | 26 class LayerScrollOffsetDelegate; |
| 27 class ScrollElasticityControllerClient; | |
| 27 | 28 |
| 28 struct CC_EXPORT InputHandlerScrollResult { | 29 struct CC_EXPORT InputHandlerScrollResult { |
| 29 InputHandlerScrollResult(); | 30 InputHandlerScrollResult(); |
| 30 // Did any layer scroll as a result this ScrollBy call? | 31 // Did any layer scroll as a result this ScrollBy call? |
| 31 bool did_scroll; | 32 bool did_scroll; |
| 32 // Was any of the scroll delta argument to this ScrollBy call not used? | 33 // Was any of the scroll delta argument to this ScrollBy call not used? |
| 33 bool did_overscroll_root; | 34 bool did_overscroll_root; |
| 34 // The total overscroll that has been accumulated by all ScrollBy calls that | 35 // The total overscroll that has been accumulated by all ScrollBy calls that |
| 35 // have had overscroll since the last ScrollBegin call. This resets upon a | 36 // have had overscroll since the last ScrollBegin call. This resets upon a |
| 36 // ScrollBy with no overscroll. | 37 // ScrollBy with no overscroll. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 virtual bool HaveTouchEventHandlersAt(const gfx::Point& viewport_point) = 0; | 144 virtual bool HaveTouchEventHandlersAt(const gfx::Point& viewport_point) = 0; |
| 144 | 145 |
| 145 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 146 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
| 146 // LatencyInfoSwapPromiseMonitor. During the life time of the | 147 // LatencyInfoSwapPromiseMonitor. During the life time of the |
| 147 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() | 148 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() |
| 148 // is called on LayerTreeHostImpl, the original latency info will be turned | 149 // is called on LayerTreeHostImpl, the original latency info will be turned |
| 149 // into a LatencyInfoSwapPromise. | 150 // into a LatencyInfoSwapPromise. |
| 150 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 151 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
| 151 ui::LatencyInfo* latency) = 0; | 152 ui::LatencyInfo* latency) = 0; |
| 152 | 153 |
| 154 // Retrieve the client to interface with a ScrollElasticityController. | |
|
aelias_OOO_until_Jul13
2014/11/12 22:17:59
This comment adds no information, please delete it
ccameron
2014/11/13 00:28:37
Done.
| |
| 155 virtual ScrollElasticityControllerClient* | |
| 156 GetScrollElasticityControllerClient() = 0; | |
| 157 | |
| 153 protected: | 158 protected: |
| 154 InputHandler() {} | 159 InputHandler() {} |
| 155 virtual ~InputHandler() {} | 160 virtual ~InputHandler() {} |
| 156 | 161 |
| 157 private: | 162 private: |
| 158 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 163 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 159 }; | 164 }; |
| 160 | 165 |
| 161 } // namespace cc | 166 } // namespace cc |
| 162 | 167 |
| 163 #endif // CC_INPUT_INPUT_HANDLER_H_ | 168 #endif // CC_INPUT_INPUT_HANDLER_H_ |
| OLD | NEW |