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" |
| 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 // Create a GestureTouchUMAHistogram object to record some touch and gesture | |
| 106 // events | |
|
tdresser
2014/08/27 12:35:39
Reword comment (the fact that we're instantiating
lanwei
2014/08/27 23:31:59
Done.
| |
| 107 GestureTouchUMAHistogram umaHistogram; | |
|
tdresser
2014/08/27 12:35:38
"Variable names are all lowercase, with underscore
lanwei
2014/08/27 23:31:59
Done.
| |
| 108 | |
| 104 // Whether double-tap gesture detection is currently supported. | 109 // Whether double-tap gesture detection is currently supported. |
| 105 bool double_tap_support_for_page_; | 110 bool double_tap_support_for_page_; |
| 106 bool double_tap_support_for_platform_; | 111 bool double_tap_support_for_platform_; |
| 107 | 112 |
| 108 const bool gesture_begin_end_types_enabled_; | 113 const bool gesture_begin_end_types_enabled_; |
| 109 }; | 114 }; |
| 110 | 115 |
| 111 } // namespace ui | 116 } // namespace ui |
| 112 | 117 |
| 113 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 118 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
| OLD | NEW |