| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // May be NULL if there is no currently active touch sequence. | 79 // May be NULL if there is no currently active touch sequence. |
| 80 const ui::MotionEvent* current_down_event() const { | 80 const ui::MotionEvent* current_down_event() const { |
| 81 return current_down_event_.get(); | 81 return current_down_event_.get(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 void InitGestureDetectors(const Config& config); | 85 void InitGestureDetectors(const Config& config); |
| 86 | 86 |
| 87 bool CanHandle(const MotionEvent& event) const; | 87 bool CanHandle(const MotionEvent& event) const; |
| 88 | 88 |
| 89 void Fling(const MotionEvent& e, float velocity_x, float velocity_y); | 89 void Fling(const MotionEvent& e, |
| 90 float velocity_x, |
| 91 float velocity_y, |
| 92 float ordinal_velocity_x, |
| 93 float ordinal_velocity_y); |
| 90 void Send(const GestureEventData& gesture); | 94 void Send(const GestureEventData& gesture); |
| 91 bool SendLongTapIfNecessary(const MotionEvent& event); | 95 bool SendLongTapIfNecessary(const MotionEvent& event); |
| 92 void EndTouchScrollIfNecessary(const MotionEvent& event, | 96 void EndTouchScrollIfNecessary(const MotionEvent& event, |
| 93 bool send_scroll_end_event); | 97 bool send_scroll_end_event); |
| 94 void OnTouchEventHandlingBegin(const MotionEvent& event); | 98 void OnTouchEventHandlingBegin(const MotionEvent& event); |
| 95 void OnTouchEventHandlingEnd(const MotionEvent& event); | 99 void OnTouchEventHandlingEnd(const MotionEvent& event); |
| 96 void UpdateDoubleTapDetectionSupport(); | 100 void UpdateDoubleTapDetectionSupport(); |
| 97 | 101 |
| 98 GestureProviderClient* const client_; | 102 GestureProviderClient* const client_; |
| 99 | 103 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 120 // opened after a GESTURE_LONG_PRESS, this is used to insert a | 124 // opened after a GESTURE_LONG_PRESS, this is used to insert a |
| 121 // GESTURE_TAP_CANCEL for removing any ::active styling. | 125 // GESTURE_TAP_CANCEL for removing any ::active styling. |
| 122 base::TimeTicks current_longpress_time_; | 126 base::TimeTicks current_longpress_time_; |
| 123 | 127 |
| 124 bool gesture_begin_end_types_enabled_; | 128 bool gesture_begin_end_types_enabled_; |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 } // namespace ui | 131 } // namespace ui |
| 128 | 132 |
| 129 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 133 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
| OLD | NEW |