OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 scoped_ptr<SyntheticGesture> synthetic_gesture, | 36 scoped_ptr<SyntheticGesture> synthetic_gesture, |
37 const OnGestureCompleteCallback& completion_callback); | 37 const OnGestureCompleteCallback& completion_callback); |
38 | 38 |
39 // Forward input events of the currently processed gesture. | 39 // Forward input events of the currently processed gesture. |
40 void Flush(base::TimeTicks timestamp); | 40 void Flush(base::TimeTicks timestamp); |
41 | 41 |
42 // To be called when all events generated from the current gesture have been | 42 // To be called when all events generated from the current gesture have been |
43 // fully flushed from the input pipeline (i.e., sent, processed and ack'ed). | 43 // fully flushed from the input pipeline (i.e., sent, processed and ack'ed). |
44 void OnDidFlushInput(); | 44 void OnDidFlushInput(); |
45 | 45 |
| 46 SyntheticGestureParams::GestureSourceType |
| 47 GetDefaultSyntheticGestureSourceType(); |
| 48 |
46 private: | 49 private: |
47 void StartGesture(const SyntheticGesture& gesture); | 50 void StartGesture(const SyntheticGesture& gesture); |
48 void StopGesture(const SyntheticGesture& gesture, | 51 void StopGesture(const SyntheticGesture& gesture, |
49 const OnGestureCompleteCallback& completion_callback, | 52 const OnGestureCompleteCallback& completion_callback, |
50 SyntheticGesture::Result result); | 53 SyntheticGesture::Result result); |
51 | 54 |
52 scoped_ptr<SyntheticGestureTarget> gesture_target_; | 55 scoped_ptr<SyntheticGestureTarget> gesture_target_; |
53 scoped_ptr<SyntheticGesture::Result> pending_gesture_result_; | 56 scoped_ptr<SyntheticGesture::Result> pending_gesture_result_; |
54 | 57 |
55 // A queue of gesture/callback pairs. Implemented as two queues to | 58 // A queue of gesture/callback pairs. Implemented as two queues to |
(...skipping 25 matching lines...) Expand all Loading... |
81 ScopedVector<SyntheticGesture> gestures_; | 84 ScopedVector<SyntheticGesture> gestures_; |
82 std::queue<OnGestureCompleteCallback> callbacks_; | 85 std::queue<OnGestureCompleteCallback> callbacks_; |
83 } pending_gesture_queue_; | 86 } pending_gesture_queue_; |
84 | 87 |
85 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureController); | 88 DISALLOW_COPY_AND_ASSIGN(SyntheticGestureController); |
86 }; | 89 }; |
87 | 90 |
88 } // namespace content | 91 } // namespace content |
89 | 92 |
90 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ | 93 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_CONTROLLER_H_ |
OLD | NEW |