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

Unified Diff: ui/events/gesture_detection/motion_event_generic.h

Issue 1035793003: Exposes more mutation functions to MotionEventGeneric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/events/gesture_detection/motion_event_generic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gesture_detection/motion_event_generic.h
diff --git a/ui/events/gesture_detection/motion_event_generic.h b/ui/events/gesture_detection/motion_event_generic.h
index 9d7733fafd1a0d5d57aa42a6d7af14bc276ddd57..f12ec440a3083483ac89ff7521c686eaadf9c93c 100644
--- a/ui/events/gesture_detection/motion_event_generic.h
+++ b/ui/events/gesture_detection/motion_event_generic.h
@@ -70,7 +70,16 @@ class GESTURE_DETECTION_EXPORT MotionEventGeneric : public MotionEvent {
float GetHistoricalY(size_t pointer_index,
size_t historical_index) const override;
- void PushPointer(const PointerProperties& pointer);
+ // Adds |pointer| to the set of pointers returning the index it was added at.
+ size_t PushPointer(const PointerProperties& pointer);
+
+ // Removes the PointerProperties at |index|.
+ void RemovePointerAt(size_t index);
+
+ PointerProperties& pointer(size_t index) { return pointers_[index]; }
+ const PointerProperties& pointer(size_t index) const {
+ return pointers_[index];
+ }
// Add an event to the history. |this| and |event| must have the same pointer
// count and must both have an action of ACTION_MOVE.
@@ -93,11 +102,6 @@ class GESTURE_DETECTION_EXPORT MotionEventGeneric : public MotionEvent {
void PopPointer();
- PointerProperties& pointer(size_t index) { return pointers_[index]; }
- const PointerProperties& pointer(size_t index) const {
- return pointers_[index];
- }
-
private:
enum { kTypicalMaxPointerCount = 5 };
« no previous file with comments | « no previous file | ui/events/gesture_detection/motion_event_generic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698