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