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

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

Issue 342633003: [Android] Select text when stylus first button is pressed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 #include <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/events/gesture_detection/motion_event.h" 9 #include "ui/events/gesture_detection/motion_event.h"
10 #include "ui/gfx/geometry/point_f.h" 10 #include "ui/gfx/geometry/point_f.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual base::TimeTicks GetEventTime() const OVERRIDE; 53 virtual base::TimeTicks GetEventTime() const OVERRIDE;
54 virtual size_t GetHistorySize() const OVERRIDE; 54 virtual size_t GetHistorySize() const OVERRIDE;
55 virtual base::TimeTicks GetHistoricalEventTime(size_t historical_index) const 55 virtual base::TimeTicks GetHistoricalEventTime(size_t historical_index) const
56 OVERRIDE; 56 OVERRIDE;
57 virtual float GetHistoricalTouchMajor(size_t pointer_index, 57 virtual float GetHistoricalTouchMajor(size_t pointer_index,
58 size_t historical_index) const OVERRIDE; 58 size_t historical_index) const OVERRIDE;
59 virtual float GetHistoricalX(size_t pointer_index, 59 virtual float GetHistoricalX(size_t pointer_index,
60 size_t historical_index) const OVERRIDE; 60 size_t historical_index) const OVERRIDE;
61 virtual float GetHistoricalY(size_t pointer_index, 61 virtual float GetHistoricalY(size_t pointer_index,
62 size_t historical_index) const OVERRIDE; 62 size_t historical_index) const OVERRIDE;
63 virtual bool ShouldConvertToMouseEvent() const OVERRIDE;
63 64
64 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE; 65 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
65 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE; 66 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
66 67
67 // Utility methods. 68 // Utility methods.
68 void SetId(int new_id); 69 void SetId(int new_id);
69 void SetTime(base::TimeTicks new_time); 70 void SetTime(base::TimeTicks new_time);
70 void PressPoint(float x, float y); 71 void PressPoint(float x, float y);
71 void MovePoint(size_t index, float x, float y); 72 void MovePoint(size_t index, float x, float y);
72 void ReleasePoint(); 73 void ReleasePoint();
73 void CancelPoint(); 74 void CancelPoint();
74 void SetTouchMajor(float new_touch_major); 75 void SetTouchMajor(float new_touch_major);
75 76
76 MotionEvent::Action action; 77 MotionEvent::Action action;
77 size_t pointer_count; 78 size_t pointer_count;
78 gfx::PointF points[MAX_POINTERS]; 79 gfx::PointF points[MAX_POINTERS];
79 base::TimeTicks time; 80 base::TimeTicks time;
80 float touch_major; 81 float touch_major;
81 int id; 82 int id;
82 }; 83 };
83 84
84 } // namespace ui 85 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698