| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // If |disable_click_delay| is true and double-tap support is disabled, | 37 // If |disable_click_delay| is true and double-tap support is disabled, |
| 38 // there will be no delay before tap events. When double-tap support is | 38 // there will be no delay before tap events. When double-tap support is |
| 39 // enabled, there will always be a delay before a tap event is fired, in | 39 // enabled, there will always be a delay before a tap event is fired, in |
| 40 // order to allow the double tap gesture to occur without firing any tap | 40 // order to allow the double tap gesture to occur without firing any tap |
| 41 // events. | 41 // events. |
| 42 bool disable_click_delay; | 42 bool disable_click_delay; |
| 43 | 43 |
| 44 // If |gesture_begin_end_types_enabled| is true, fire an ET_GESTURE_BEGIN | 44 // If |gesture_begin_end_types_enabled| is true, fire an ET_GESTURE_BEGIN |
| 45 // event for every added touch point, and an ET_GESTURE_END event for every | 45 // event for every added touch point, and an ET_GESTURE_END event for every |
| 46 // removed touch point. | 46 // removed touch point. Defaults to false. |
| 47 bool gesture_begin_end_types_enabled; | 47 bool gesture_begin_end_types_enabled; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 GestureProvider(const Config& config, GestureProviderClient* client); | 50 GestureProvider(const Config& config, GestureProviderClient* client); |
| 51 ~GestureProvider(); | 51 ~GestureProvider(); |
| 52 | 52 |
| 53 // Handle the incoming MotionEvent, returning false if the event could not | 53 // Handle the incoming MotionEvent, returning false if the event could not |
| 54 // be handled. | 54 // be handled. |
| 55 bool OnTouchEvent(const MotionEvent& event); | 55 bool OnTouchEvent(const MotionEvent& event); |
| 56 | 56 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // opened after a GESTURE_LONG_PRESS, this is used to insert a | 120 // opened after a GESTURE_LONG_PRESS, this is used to insert a |
| 121 // GESTURE_TAP_CANCEL for removing any ::active styling. | 121 // GESTURE_TAP_CANCEL for removing any ::active styling. |
| 122 base::TimeTicks current_longpress_time_; | 122 base::TimeTicks current_longpress_time_; |
| 123 | 123 |
| 124 bool gesture_begin_end_types_enabled_; | 124 bool gesture_begin_end_types_enabled_; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace ui | 127 } // namespace ui |
| 128 | 128 |
| 129 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 129 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
| OLD | NEW |