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_UI_MOTION_EVENT_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_ |
6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Returns true iff the touch was valid. | 27 // Returns true iff the touch was valid. |
28 bool OnTouch(const TouchEvent& touch); | 28 bool OnTouch(const TouchEvent& touch); |
29 | 29 |
30 // We can't cleanup removed touch points immediately upon receipt of a | 30 // We can't cleanup removed touch points immediately upon receipt of a |
31 // TouchCancel or TouchRelease, as the MotionEvent needs to be able to report | 31 // TouchCancel or TouchRelease, as the MotionEvent needs to be able to report |
32 // information about those touch events. Once the MotionEvent has been | 32 // information about those touch events. Once the MotionEvent has been |
33 // processed, we call CleanupRemovedTouchPoints to do the required | 33 // processed, we call CleanupRemovedTouchPoints to do the required |
34 // book-keeping. | 34 // book-keeping. |
35 void CleanupRemovedTouchPoints(const TouchEvent& event); | 35 void CleanupRemovedTouchPoints(const TouchEvent& event); |
36 | 36 |
| 37 int GetIndexFromId(int id) const; |
| 38 |
37 private: | 39 private: |
38 void AddTouch(const TouchEvent& touch); | 40 void AddTouch(const TouchEvent& touch); |
39 void UpdateTouch(const TouchEvent& touch); | 41 void UpdateTouch(const TouchEvent& touch); |
40 void UpdateCachedAction(const TouchEvent& touch); | 42 void UpdateCachedAction(const TouchEvent& touch); |
41 int GetIndexFromId(int id) const; | |
42 | 43 |
43 DISALLOW_COPY_AND_ASSIGN(MotionEventAura); | 44 DISALLOW_COPY_AND_ASSIGN(MotionEventAura); |
44 }; | 45 }; |
45 | 46 |
46 } // namespace ui | 47 } // namespace ui |
47 | 48 |
48 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_ | 49 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_ |
OLD | NEW |