| 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/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // LayerScrollOffsetDelegate.GetTotalScrollOffset has changed for reasons | 110 // LayerScrollOffsetDelegate.GetTotalScrollOffset has changed for reasons |
| 111 // other than a SetTotalScrollOffset call. | 111 // other than a SetTotalScrollOffset call. |
| 112 // NOTE: This should only called after a valid delegate was set via a call to | 112 // NOTE: This should only called after a valid delegate was set via a call to |
| 113 // SetRootLayerScrollOffsetDelegate. | 113 // SetRootLayerScrollOffsetDelegate. |
| 114 virtual void OnRootLayerDelegatedScrollOffsetChanged() = 0; | 114 virtual void OnRootLayerDelegatedScrollOffsetChanged() = 0; |
| 115 | 115 |
| 116 virtual void PinchGestureBegin() = 0; | 116 virtual void PinchGestureBegin() = 0; |
| 117 virtual void PinchGestureUpdate(float magnify_delta, gfx::Point anchor) = 0; | 117 virtual void PinchGestureUpdate(float magnify_delta, gfx::Point anchor) = 0; |
| 118 virtual void PinchGestureEnd() = 0; | 118 virtual void PinchGestureEnd() = 0; |
| 119 | 119 |
| 120 virtual void StartPageScaleAnimation(gfx::Vector2d target_offset, | 120 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
| 121 bool anchor_point, | 121 bool anchor_point, |
| 122 float page_scale, | 122 float page_scale, |
| 123 base::TimeDelta duration) = 0; | 123 base::TimeDelta duration) = 0; |
| 124 | 124 |
| 125 // Request another callback to InputHandlerClient::Animate(). | 125 // Request another callback to InputHandlerClient::Animate(). |
| 126 virtual void ScheduleAnimation() = 0; | 126 virtual void ScheduleAnimation() = 0; |
| 127 | 127 |
| 128 virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_point) = 0; | 128 virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_point) = 0; |
| 129 | 129 |
| 130 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 130 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
| 131 // LatencyInfoSwapPromiseMonitor. During the life time of the | 131 // LatencyInfoSwapPromiseMonitor. During the life time of the |
| 132 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() | 132 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() |
| 133 // is called on LayerTreeHostImpl, the original latency info will be turned | 133 // is called on LayerTreeHostImpl, the original latency info will be turned |
| 134 // into a LatencyInfoSwapPromise. | 134 // into a LatencyInfoSwapPromise. |
| 135 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 135 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
| 136 ui::LatencyInfo* latency) = 0; | 136 ui::LatencyInfo* latency) = 0; |
| 137 | 137 |
| 138 protected: | 138 protected: |
| 139 InputHandler() {} | 139 InputHandler() {} |
| 140 virtual ~InputHandler() {} | 140 virtual ~InputHandler() {} |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 143 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace cc | 146 } // namespace cc |
| 147 | 147 |
| 148 #endif // CC_INPUT_INPUT_HANDLER_H_ | 148 #endif // CC_INPUT_INPUT_HANDLER_H_ |
| OLD | NEW |