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

Side by Side Diff: ui/events/test/motion_event_test_utils.h

Issue 2175803002: The helper functions for slop region check and subtraction are modified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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_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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 30 matching lines...) Expand all
41 base::TimeTicks time, 41 base::TimeTicks time,
42 const std::vector<gfx::PointF>& positions); 42 const std::vector<gfx::PointF>& positions);
43 MockMotionEvent(const MockMotionEvent& other); 43 MockMotionEvent(const MockMotionEvent& other);
44 44
45 ~MockMotionEvent() override; 45 ~MockMotionEvent() override;
46 46
47 // Utility methods. 47 // Utility methods.
48 MockMotionEvent& PressPoint(float x, float y); 48 MockMotionEvent& PressPoint(float x, float y);
49 MockMotionEvent& MovePoint(size_t index, float x, float y); 49 MockMotionEvent& MovePoint(size_t index, float x, float y);
50 MockMotionEvent& ReleasePoint(); 50 MockMotionEvent& ReleasePoint();
51 MockMotionEvent& ReleasePointAtIndex(size_t index);
51 MockMotionEvent& CancelPoint(); 52 MockMotionEvent& CancelPoint();
52 MockMotionEvent& SetTouchMajor(float new_touch_major); 53 MockMotionEvent& SetTouchMajor(float new_touch_major);
53 MockMotionEvent& SetRawOffset(float raw_offset_x, float raw_offset_y); 54 MockMotionEvent& SetRawOffset(float raw_offset_x, float raw_offset_y);
54 MockMotionEvent& SetToolType(size_t index, ToolType tool_type); 55 MockMotionEvent& SetToolType(size_t index, ToolType tool_type);
55 MockMotionEvent& SetPrimaryPointerId(int id); 56 MockMotionEvent& SetPrimaryPointerId(int id);
56 57
57 private: 58 private:
58 void PushPointer(float x, float y); 59 void PushPointer(float x, float y);
59 void UpdatePointersAndID(); 60 void UpdatePointersAndID();
60 }; 61 };
61 62
62 std::string ToString(const MotionEvent& event); 63 std::string ToString(const MotionEvent& event);
63 64
64 } // namespace test 65 } // namespace test
65 } // namespace ui 66 } // namespace ui
66 67
67 #endif // UI_EVENTS_TEST_MOTION_EVENT_TEST_UTILS_H_ 68 #endif // UI_EVENTS_TEST_MOTION_EVENT_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_provider_unittest.cc ('k') | ui/events/test/motion_event_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698