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> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/time/time.h" | 11 #include "base/time/time.h" |
11 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
12 #include "cc/input/event_listener_properties.h" | 13 #include "cc/input/event_listener_properties.h" |
13 #include "cc/input/main_thread_scrolling_reason.h" | 14 #include "cc/input/main_thread_scrolling_reason.h" |
14 #include "cc/input/scroll_state.h" | 15 #include "cc/input/scroll_state.h" |
15 #include "cc/input/scrollbar.h" | 16 #include "cc/input/scrollbar.h" |
16 #include "cc/trees/swap_promise_monitor.h" | 17 #include "cc/trees/swap_promise_monitor.h" |
17 | 18 |
18 namespace gfx { | 19 namespace gfx { |
19 class Point; | 20 class Point; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 190 |
190 // Whether the page should be given the opportunity to suppress scrolling by | 191 // Whether the page should be given the opportunity to suppress scrolling by |
191 // consuming touch events that started at |viewport_point|. | 192 // consuming touch events that started at |viewport_point|. |
192 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; | 193 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; |
193 | 194 |
194 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 195 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
195 // LatencyInfoSwapPromiseMonitor. During the life time of the | 196 // LatencyInfoSwapPromiseMonitor. During the life time of the |
196 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() | 197 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() |
197 // is called on LayerTreeHostImpl, the original latency info will be turned | 198 // is called on LayerTreeHostImpl, the original latency info will be turned |
198 // into a LatencyInfoSwapPromise. | 199 // into a LatencyInfoSwapPromise. |
199 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 200 virtual std::unique_ptr<SwapPromiseMonitor> |
200 ui::LatencyInfo* latency) = 0; | 201 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0; |
201 | 202 |
202 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; | 203 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; |
203 | 204 |
204 protected: | 205 protected: |
205 InputHandler() {} | 206 InputHandler() {} |
206 virtual ~InputHandler() {} | 207 virtual ~InputHandler() {} |
207 | 208 |
208 private: | 209 private: |
209 DISALLOW_COPY_AND_ASSIGN(InputHandler); | 210 DISALLOW_COPY_AND_ASSIGN(InputHandler); |
210 }; | 211 }; |
211 | 212 |
212 } // namespace cc | 213 } // namespace cc |
213 | 214 |
214 #endif // CC_INPUT_INPUT_HANDLER_H_ | 215 #endif // CC_INPUT_INPUT_HANDLER_H_ |
OLD | NEW |