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_TEST_MOTION_EVENT_TEST_UTILS_H_ | 5 #ifndef UI_EVENTS_TEST_MOTION_EVENT_TEST_UTILS_H_ |
6 #define UI_EVENTS_TEST_MOTION_EVENT_TEST_UTILS_H_ | 6 #define UI_EVENTS_TEST_MOTION_EVENT_TEST_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 ~MockMotionEvent() override; | 44 ~MockMotionEvent() override; |
45 | 45 |
46 // Utility methods. | 46 // Utility methods. |
47 void PressPoint(float x, float y); | 47 void PressPoint(float x, float y); |
48 void MovePoint(size_t index, float x, float y); | 48 void MovePoint(size_t index, float x, float y); |
49 void ReleasePoint(); | 49 void ReleasePoint(); |
50 void CancelPoint(); | 50 void CancelPoint(); |
51 void SetTouchMajor(float new_touch_major); | 51 void SetTouchMajor(float new_touch_major); |
52 void SetRawOffset(float raw_offset_x, float raw_offset_y); | 52 void SetRawOffset(float raw_offset_x, float raw_offset_y); |
53 void SetToolType(size_t index, ToolType tool_type); | 53 void SetToolType(size_t index, ToolType tool_type); |
| 54 void SetPrimaryPointerId(int id); |
54 | 55 |
55 private: | 56 private: |
56 void PushPointer(float x, float y); | 57 void PushPointer(float x, float y); |
57 void ResolvePointers(); | 58 void ResolvePointers(); |
58 }; | 59 }; |
59 | 60 |
60 std::string ToString(const MotionEvent& event); | 61 std::string ToString(const MotionEvent& event); |
61 | 62 |
62 } // namespace test | 63 } // namespace test |
63 } // namespace ui | 64 } // namespace ui |
64 | 65 |
65 #endif // UI_EVENTS_TEST_MOTION_EVENT_TEST_UTILS_H_ | 66 #endif // UI_EVENTS_TEST_MOTION_EVENT_TEST_UTILS_H_ |
OLD | NEW |