Chromium Code Reviews| 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 UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
| 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/events/gesture_detection/gesture_detection_export.h" | 10 #include "ui/events/gesture_detection/gesture_detection_export.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 const ui::MotionEvent* current_down_event() const { | 77 const ui::MotionEvent* current_down_event() const { |
| 78 return current_down_event_.get(); | 78 return current_down_event_.get(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 void InitGestureDetectors(const Config& config); | 82 void InitGestureDetectors(const Config& config); |
| 83 | 83 |
| 84 bool CanHandle(const MotionEvent& event) const; | 84 bool CanHandle(const MotionEvent& event) const; |
| 85 | 85 |
| 86 void Fling(base::TimeTicks time, | 86 void Fling(base::TimeTicks time, |
| 87 int motion_event_id, | |
|
jdduke (slow)
2014/04/03 15:47:54
Hmm, can we have Fling take a const MotionEvent& a
tdresser
2014/04/03 18:09:47
Done.
| |
| 87 float x, | 88 float x, |
| 88 float y, | 89 float y, |
| 89 float velocity_x, | 90 float velocity_x, |
| 90 float velocity_y); | 91 float velocity_y); |
| 91 void Send(const GestureEventData& gesture); | 92 void Send(const GestureEventData& gesture); |
| 92 void SendTapCancelIfNecessary(const MotionEvent& event); | 93 void SendTapCancelIfNecessary(const MotionEvent& event); |
| 94 void SendTapCancelIfNecessary(const GestureEventData& event); | |
| 93 bool SendLongTapIfNecessary(const MotionEvent& event); | 95 bool SendLongTapIfNecessary(const MotionEvent& event); |
| 94 void EndTouchScrollIfNecessary(base::TimeTicks time, | 96 void EndTouchScrollIfNecessary(base::TimeTicks time, |
| 97 int motion_event_id, | |
| 95 bool send_scroll_end_event); | 98 bool send_scroll_end_event); |
| 96 | 99 |
| 97 GestureProviderClient* const client_; | 100 GestureProviderClient* const client_; |
| 98 | 101 |
| 99 class GestureListenerImpl; | 102 class GestureListenerImpl; |
| 100 friend class GestureListenerImpl; | 103 friend class GestureListenerImpl; |
| 101 scoped_ptr<GestureListenerImpl> gesture_listener_; | 104 scoped_ptr<GestureListenerImpl> gesture_listener_; |
| 102 | 105 |
| 103 class ScaleGestureListenerImpl; | 106 class ScaleGestureListenerImpl; |
| 104 friend class ScaleGestureListenerImpl; | 107 friend class ScaleGestureListenerImpl; |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 122 | 125 |
| 123 // Keeps track of the current GESTURE_LONG_PRESS event. If a context menu is | 126 // Keeps track of the current GESTURE_LONG_PRESS event. If a context menu is |
| 124 // opened after a GESTURE_LONG_PRESS, this is used to insert a | 127 // opened after a GESTURE_LONG_PRESS, this is used to insert a |
| 125 // GESTURE_TAP_CANCEL for removing any ::active styling. | 128 // GESTURE_TAP_CANCEL for removing any ::active styling. |
| 126 base::TimeTicks current_longpress_time_; | 129 base::TimeTicks current_longpress_time_; |
| 127 }; | 130 }; |
| 128 | 131 |
| 129 } // namespace ui | 132 } // namespace ui |
| 130 | 133 |
| 131 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 134 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
| OLD | NEW |