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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // other than a SetTotalScrollOffset call. | 116 // other than a SetTotalScrollOffset call. |
117 // NOTE: This should only called after a valid delegate was set via a call to | 117 // NOTE: This should only called after a valid delegate was set via a call to |
118 // SetRootLayerScrollOffsetDelegate. | 118 // SetRootLayerScrollOffsetDelegate. |
119 virtual void OnRootLayerDelegatedScrollOffsetChanged() = 0; | 119 virtual void OnRootLayerDelegatedScrollOffsetChanged() = 0; |
120 | 120 |
121 virtual void PinchGestureBegin() = 0; | 121 virtual void PinchGestureBegin() = 0; |
122 virtual void PinchGestureUpdate(float magnify_delta, | 122 virtual void PinchGestureUpdate(float magnify_delta, |
123 const gfx::Point& anchor) = 0; | 123 const gfx::Point& anchor) = 0; |
124 virtual void PinchGestureEnd() = 0; | 124 virtual void PinchGestureEnd() = 0; |
125 | 125 |
126 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | |
127 bool anchor_point, | |
128 float page_scale, | |
129 base::TimeDelta duration) = 0; | |
130 | |
131 // Request another callback to InputHandlerClient::Animate(). | 126 // Request another callback to InputHandlerClient::Animate(). |
132 virtual void SetNeedsAnimate() = 0; | 127 virtual void SetNeedsAnimate() = 0; |
133 | 128 |
134 // Whether the layer under |viewport_point| is the currently scrolling layer. | 129 // Whether the layer under |viewport_point| is the currently scrolling layer. |
135 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, | 130 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, |
136 ScrollInputType type) = 0; | 131 ScrollInputType type) = 0; |
137 | 132 |
138 virtual bool HaveTouchEventHandlersAt(const gfx::Point& viewport_point) = 0; | 133 virtual bool HaveTouchEventHandlersAt(const gfx::Point& viewport_point) = 0; |
139 | 134 |
140 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 135 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
141 // LatencyInfoSwapPromiseMonitor. During the life time of the | 136 // LatencyInfoSwapPromiseMonitor. During the life time of the |
142 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() | 137 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() |
143 // is called on LayerTreeHostImpl, the original latency info will be turned | 138 // is called on LayerTreeHostImpl, the original latency info will be turned |
144 // into a LatencyInfoSwapPromise. | 139 // into a LatencyInfoSwapPromise. |
145 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 140 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
146 ui::LatencyInfo* latency) = 0; | 141 ui::LatencyInfo* latency) = 0; |
147 | 142 |
148 protected: | 143 protected: |
149 InputHandler() {} | 144 InputHandler() {} |
150 virtual ~InputHandler() {} | 145 virtual ~InputHandler() {} |
151 | 146 |
152 private: | 147 private: |
153 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 148 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
154 }; | 149 }; |
155 | 150 |
156 } // namespace cc | 151 } // namespace cc |
157 | 152 |
158 #endif // CC_INPUT_INPUT_HANDLER_H_ | 153 #endif // CC_INPUT_INPUT_HANDLER_H_ |
OLD | NEW |