OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CONTENT_GESTURE_PROVIDER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_GESTURE_PROVIDER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_GESTURE_PROVIDER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_GESTURE_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/port/common/input_event_ack_state.h" | 9 #include "content/port/common/input_event_ack_state.h" |
10 #include "ui/events/gesture_detection/gesture_event_data_packet.h" | 10 #include "ui/events/gesture_detection/gesture_event_data_packet.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // gesture detector. Otherwise, returns false, in which case the caller | 37 // gesture detector. Otherwise, returns false, in which case the caller |
38 // should drop |event|, not forwarding it to the renderer. | 38 // should drop |event|, not forwarding it to the renderer. |
39 bool OnTouchEvent(const ui::MotionEvent& event); | 39 bool OnTouchEvent(const ui::MotionEvent& event); |
40 | 40 |
41 // To be called upon ack of an event that was forwarded after a successful | 41 // To be called upon ack of an event that was forwarded after a successful |
42 // call to |OnTouchEvent()|. | 42 // call to |OnTouchEvent()|. |
43 void OnTouchEventAck(InputEventAckState ack_state); | 43 void OnTouchEventAck(InputEventAckState ack_state); |
44 | 44 |
45 // Methods delegated to |gesture_provider_|. | 45 // Methods delegated to |gesture_provider_|. |
46 void ResetGestureDetectors(); | 46 void ResetGestureDetectors(); |
47 void CancelActiveTouchSequence(); | |
48 void SetMultiTouchSupportEnabled(bool enabled); | 47 void SetMultiTouchSupportEnabled(bool enabled); |
49 void SetDoubleTapSupportForPlatformEnabled(bool enabled); | 48 void SetDoubleTapSupportForPlatformEnabled(bool enabled); |
50 void SetDoubleTapSupportForPageEnabled(bool enabled); | 49 void SetDoubleTapSupportForPageEnabled(bool enabled); |
| 50 const ui::MotionEvent* GetCurrentDownEvent() const; |
51 | 51 |
52 private: | 52 private: |
53 // ui::GestureProviderClient | 53 // ui::GestureProviderClient |
54 virtual void OnGestureEvent(const ui::GestureEventData& event) OVERRIDE; | 54 virtual void OnGestureEvent(const ui::GestureEventData& event) OVERRIDE; |
55 | 55 |
56 // TouchDispositionGestureFilterClient | 56 // TouchDispositionGestureFilterClient |
57 virtual void ForwardGestureEvent(const ui::GestureEventData& event) OVERRIDE; | 57 virtual void ForwardGestureEvent(const ui::GestureEventData& event) OVERRIDE; |
58 | 58 |
59 ContentGestureProviderClient* const client_; | 59 ContentGestureProviderClient* const client_; |
60 float touch_to_gesture_scale_; | 60 float touch_to_gesture_scale_; |
61 | 61 |
62 ui::GestureProvider gesture_provider_; | 62 ui::GestureProvider gesture_provider_; |
63 ui::TouchDispositionGestureFilter gesture_filter_; | 63 ui::TouchDispositionGestureFilter gesture_filter_; |
64 | 64 |
65 bool handling_event_; | 65 bool handling_event_; |
66 ui::GestureEventDataPacket pending_gesture_packet_; | 66 ui::GestureEventDataPacket pending_gesture_packet_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(ContentGestureProvider); | 68 DISALLOW_COPY_AND_ASSIGN(ContentGestureProvider); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace content | 71 } // namespace content |
72 | 72 |
73 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_GESTURE_PROVIDER_H_ | 73 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_CONTENT_GESTURE_PROVIDER_H_ |
OLD | NEW |