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" |
11 #include "ui/events/gesture_detection/gesture_detector.h" | 11 #include "ui/events/gesture_detection/gesture_detector.h" |
12 #include "ui/events/gesture_detection/gesture_event_data.h" | 12 #include "ui/events/gesture_detection/gesture_event_data.h" |
| 13 #include "ui/events/gesture_detection/gesture_touch_uma_histogram.h" |
13 #include "ui/events/gesture_detection/scale_gesture_detector.h" | 14 #include "ui/events/gesture_detection/scale_gesture_detector.h" |
14 #include "ui/events/gesture_detection/snap_scroll_controller.h" | 15 #include "ui/events/gesture_detection/snap_scroll_controller.h" |
15 #include "ui/gfx/display.h" | 16 #include "ui/gfx/display.h" |
16 | 17 |
17 namespace ui { | 18 namespace ui { |
18 | 19 |
19 class GESTURE_DETECTION_EXPORT GestureProviderClient { | 20 class GESTURE_DETECTION_EXPORT GestureProviderClient { |
20 public: | 21 public: |
21 virtual ~GestureProviderClient() {} | 22 virtual ~GestureProviderClient() {} |
22 virtual void OnGestureEvent(const GestureEventData& gesture) = 0; | 23 virtual void OnGestureEvent(const GestureEventData& gesture) = 0; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 bool CanHandle(const MotionEvent& event) const; | 95 bool CanHandle(const MotionEvent& event) const; |
95 void OnTouchEventHandlingBegin(const MotionEvent& event); | 96 void OnTouchEventHandlingBegin(const MotionEvent& event); |
96 void OnTouchEventHandlingEnd(const MotionEvent& event); | 97 void OnTouchEventHandlingEnd(const MotionEvent& event); |
97 void UpdateDoubleTapDetectionSupport(); | 98 void UpdateDoubleTapDetectionSupport(); |
98 | 99 |
99 class GestureListenerImpl; | 100 class GestureListenerImpl; |
100 scoped_ptr<GestureListenerImpl> gesture_listener_; | 101 scoped_ptr<GestureListenerImpl> gesture_listener_; |
101 | 102 |
102 scoped_ptr<MotionEvent> current_down_event_; | 103 scoped_ptr<MotionEvent> current_down_event_; |
103 | 104 |
| 105 // Logs information on touch and gesture events. |
| 106 GestureTouchUMAHistogram uma_histogram_; |
| 107 |
104 // Whether double-tap gesture detection is currently supported. | 108 // Whether double-tap gesture detection is currently supported. |
105 bool double_tap_support_for_page_; | 109 bool double_tap_support_for_page_; |
106 bool double_tap_support_for_platform_; | 110 bool double_tap_support_for_platform_; |
107 | 111 |
108 const bool gesture_begin_end_types_enabled_; | 112 const bool gesture_begin_end_types_enabled_; |
109 }; | 113 }; |
110 | 114 |
111 } // namespace ui | 115 } // namespace ui |
112 | 116 |
113 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 117 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
OLD | NEW |