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/macros.h" | 8 #include "base/macros.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" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // Request another callback to InputHandlerClient::Animate(). | 163 // Request another callback to InputHandlerClient::Animate(). |
164 virtual void SetNeedsAnimateInput() = 0; | 164 virtual void SetNeedsAnimateInput() = 0; |
165 | 165 |
166 // Returns true if there is an active scroll on the inner viewport layer. | 166 // Returns true if there is an active scroll on the inner viewport layer. |
167 virtual bool IsCurrentlyScrollingInnerViewport() const = 0; | 167 virtual bool IsCurrentlyScrollingInnerViewport() const = 0; |
168 | 168 |
169 // Whether the layer under |viewport_point| is the currently scrolling layer. | 169 // Whether the layer under |viewport_point| is the currently scrolling layer. |
170 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, | 170 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, |
171 ScrollInputType type) const = 0; | 171 ScrollInputType type) const = 0; |
172 | 172 |
173 virtual bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) = 0; | 173 virtual bool HaveWheelEventHandlers() const = 0; |
174 | 174 |
175 // Whether the page should be given the opportunity to suppress scrolling by | 175 // Whether the page should be given the opportunity to suppress scrolling by |
176 // consuming touch events that started at |viewport_point|. | 176 // consuming touch events that started at |viewport_point|. |
177 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; | 177 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; |
178 | 178 |
179 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 179 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
180 // LatencyInfoSwapPromiseMonitor. During the life time of the | 180 // LatencyInfoSwapPromiseMonitor. During the life time of the |
181 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() | 181 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() |
182 // is called on LayerTreeHostImpl, the original latency info will be turned | 182 // is called on LayerTreeHostImpl, the original latency info will be turned |
183 // into a LatencyInfoSwapPromise. | 183 // into a LatencyInfoSwapPromise. |
184 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 184 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
185 ui::LatencyInfo* latency) = 0; | 185 ui::LatencyInfo* latency) = 0; |
186 | 186 |
187 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; | 187 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; |
188 | 188 |
189 protected: | 189 protected: |
190 InputHandler() {} | 190 InputHandler() {} |
191 virtual ~InputHandler() {} | 191 virtual ~InputHandler() {} |
192 | 192 |
193 private: | 193 private: |
194 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 194 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
195 }; | 195 }; |
196 | 196 |
197 } // namespace cc | 197 } // namespace cc |
198 | 198 |
199 #endif // CC_INPUT_INPUT_HANDLER_H_ | 199 #endif // CC_INPUT_INPUT_HANDLER_H_ |
OLD | NEW |