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

Unified Diff: ui/events/test/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: fixed signed unsigned comparison error 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/gesture_detection/velocity_tracker_unittest.cc ('k') | ui/events/test/mock_motion_event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/mock_motion_event.h
diff --git a/ui/events/gesture_detection/mock_motion_event.h b/ui/events/test/mock_motion_event.h
similarity index 94%
rename from ui/events/gesture_detection/mock_motion_event.h
rename to ui/events/test/mock_motion_event.h
index 53df76ee077b68c67d46a9800d02b2994c5f2282..f5258102fbccccf6562d1d7e3be87a815b4128f1 100644
--- a/ui/events/gesture_detection/mock_motion_event.h
+++ b/ui/events/test/mock_motion_event.h
@@ -10,6 +10,7 @@
#include "ui/gfx/geometry/point_f.h"
namespace ui {
+namespace test {
struct MockMotionEvent : public MotionEvent {
enum { MAX_POINTERS = 3 };
@@ -36,6 +37,7 @@ struct MockMotionEvent : public MotionEvent {
base::TimeTicks time,
const std::vector<gfx::PointF>& positions);
MockMotionEvent(const MockMotionEvent& other);
+
virtual ~MockMotionEvent();
// MotionEvent methods.
@@ -75,14 +77,19 @@ struct MockMotionEvent : public MotionEvent {
void CancelPoint();
void SetTouchMajor(float new_touch_major);
void SetRawOffset(float raw_offset_x, float raw_offset_y);
+ void SetToolType(size_t index, ToolType tool_type);
+ void SetButtonState(int button_state);
MotionEvent::Action action;
size_t pointer_count;
gfx::PointF points[MAX_POINTERS];
+ ToolType tool_types[MAX_POINTERS];
gfx::Vector2dF raw_offset;
base::TimeTicks time;
float touch_major;
int id;
+ int button_state;
};
+} // namespace test
} // namespace ui
« no previous file with comments | « ui/events/gesture_detection/velocity_tracker_unittest.cc ('k') | ui/events/test/mock_motion_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698