| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 191 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
| 192 // LatencyInfoSwapPromiseMonitor. During the life time of the | 192 // LatencyInfoSwapPromiseMonitor. During the life time of the |
| 193 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() | 193 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() |
| 194 // is called on LayerTreeHostImpl, the original latency info will be turned | 194 // is called on LayerTreeHostImpl, the original latency info will be turned |
| 195 // into a LatencyInfoSwapPromise. | 195 // into a LatencyInfoSwapPromise. |
| 196 virtual std::unique_ptr<SwapPromiseMonitor> | 196 virtual std::unique_ptr<SwapPromiseMonitor> |
| 197 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0; | 197 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0; |
| 198 | 198 |
| 199 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; | 199 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; |
| 200 | 200 |
| 201 // Called by the single-threaded UI Compositor to get or set the scroll offset |
| 202 // on the impl side. Retruns false if |layer_id| isn't in the active tree. |
| 203 virtual bool GetScrollOffsetForLayer(int layer_id, |
| 204 gfx::ScrollOffset* offset) = 0; |
| 205 virtual bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) = 0; |
| 206 |
| 201 protected: | 207 protected: |
| 202 InputHandler() {} | 208 InputHandler() {} |
| 203 virtual ~InputHandler() {} | 209 virtual ~InputHandler() {} |
| 204 | 210 |
| 205 private: | 211 private: |
| 206 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 212 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
| 207 }; | 213 }; |
| 208 | 214 |
| 209 } // namespace cc | 215 } // namespace cc |
| 210 | 216 |
| 211 #endif // CC_INPUT_INPUT_HANDLER_H_ | 217 #endif // CC_INPUT_INPUT_HANDLER_H_ |
| OLD | NEW |