Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ui/events/gesture_detection/gesture_provider.h

Issue 212663010: Store the id of a contributing motion event in GestureEventData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update test. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // May be NULL if there is no currently active touch sequence. 80 // May be NULL if there is no currently active touch sequence.
81 const ui::MotionEvent* current_down_event() const { 81 const ui::MotionEvent* current_down_event() const {
82 return current_down_event_.get(); 82 return current_down_event_.get();
83 } 83 }
84 84
85 private: 85 private:
86 void InitGestureDetectors(const Config& config); 86 void InitGestureDetectors(const Config& config);
87 87
88 bool CanHandle(const MotionEvent& event) const; 88 bool CanHandle(const MotionEvent& event) const;
89 89
90 void Fling(base::TimeTicks time, 90 void Fling(const MotionEvent& e, float velocity_x, float velocity_y);
91 float x,
92 float y,
93 float velocity_x,
94 float velocity_y);
95 void Send(const GestureEventData& gesture); 91 void Send(const GestureEventData& gesture);
96 void SendTapCancelIfNecessary(const MotionEvent& event); 92 void SendTapCancelIfNecessary(const MotionEvent& event);
93 void SendTapCancelIfNecessary(const GestureEventData& event);
97 bool SendLongTapIfNecessary(const MotionEvent& event); 94 bool SendLongTapIfNecessary(const MotionEvent& event);
98 void EndTouchScrollIfNecessary(base::TimeTicks time, 95 void EndTouchScrollIfNecessary(const MotionEvent& event,
99 bool send_scroll_end_event); 96 bool send_scroll_end_event);
100 void UpdateDoubleTapDetectionSupport(); 97 void UpdateDoubleTapDetectionSupport();
101 98
102 GestureProviderClient* const client_; 99 GestureProviderClient* const client_;
103 100
104 class GestureListenerImpl; 101 class GestureListenerImpl;
105 friend class GestureListenerImpl; 102 friend class GestureListenerImpl;
106 scoped_ptr<GestureListenerImpl> gesture_listener_; 103 scoped_ptr<GestureListenerImpl> gesture_listener_;
107 104
108 class ScaleGestureListenerImpl; 105 class ScaleGestureListenerImpl;
(...skipping 22 matching lines...) Expand all
131 128
132 // Keeps track of the current GESTURE_LONG_PRESS event. If a context menu is 129 // Keeps track of the current GESTURE_LONG_PRESS event. If a context menu is
133 // opened after a GESTURE_LONG_PRESS, this is used to insert a 130 // opened after a GESTURE_LONG_PRESS, this is used to insert a
134 // GESTURE_TAP_CANCEL for removing any ::active styling. 131 // GESTURE_TAP_CANCEL for removing any ::active styling.
135 base::TimeTicks current_longpress_time_; 132 base::TimeTicks current_longpress_time_;
136 }; 133 };
137 134
138 } // namespace ui 135 } // namespace ui
139 136
140 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ 137 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data.cc ('k') | ui/events/gesture_detection/gesture_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698