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

Unified Diff: ui/aura/test/event_generator.cc

Issue 10824200: Handful of tweaks for tab dragging with touch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows Created 8 years, 4 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/aura/test/event_generator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/event_generator.cc
diff --git a/ui/aura/test/event_generator.cc b/ui/aura/test/event_generator.cc
index ce2848475a6ca2a2c2904d04339cc50d9a1c60eb..4115fb041b44c12e99a841cee1c411be96dbb0be 100644
--- a/ui/aura/test/event_generator.cc
+++ b/ui/aura/test/event_generator.cc
@@ -137,6 +137,13 @@ void EventGenerator::PressTouch() {
Dispatch(touchev);
}
+void EventGenerator::MoveTouch(const gfx::Point& point) {
+ TestTouchEvent touchev(ui::ET_TOUCH_MOVED, point, flags_);
+ Dispatch(touchev);
+
+ current_location_ = point;
+}
+
void EventGenerator::ReleaseTouch() {
TestTouchEvent touchev(ui::ET_TOUCH_RELEASED, current_location_, flags_);
Dispatch(touchev);
@@ -144,12 +151,7 @@ void EventGenerator::ReleaseTouch() {
void EventGenerator::PressMoveAndReleaseTouchTo(const gfx::Point& point) {
PressTouch();
-
- TestTouchEvent touchev(ui::ET_TOUCH_MOVED, point, flags_);
- Dispatch(touchev);
-
- current_location_ = point;
-
+ MoveTouch(point);
ReleaseTouch();
}
« no previous file with comments | « ui/aura/test/event_generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698