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

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

Issue 240333007: wip: Second crack at implementing the touch exploration mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a flag to disable the touch exploration mode. Created 6 years, 8 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') | ui/aura/window_event_dispatcher.cc » ('j') | 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 42614f57474a1c1b22b56239ed02209bf6f8c8ac..de4318e84d609afc93ce818ee0209acea40c264d 100644
--- a/ui/aura/test/event_generator.cc
+++ b/ui/aura/test/event_generator.cc
@@ -11,7 +11,9 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/event.h"
+#include "ui/events/event_source.h"
#include "ui/events/event_utils.h"
+#include "ui/events/test/events_test_utils.h"
#include "ui/gfx/vector2d_conversions.h"
#if defined(USE_X11)
@@ -228,6 +230,16 @@ void EventGenerator::MoveTouchId(const gfx::Point& point, int touch_id) {
UpdateCurrentDispatcher(point);
}
+void EventGenerator::StationaryTouch() {
+ StationaryTouchId(0);
+}
+
+void EventGenerator::StationaryTouchId(int touch_id) {
+ TestTouchEvent touchev(
+ ui::ET_TOUCH_STATIONARY, GetLocationInCurrentRoot(), touch_id, flags_);
+ Dispatch(&touchev);
+}
+
void EventGenerator::ReleaseTouch() {
ReleaseTouchId(0);
}
@@ -607,8 +619,10 @@ void EventGenerator::DoDispatchEvent(ui::Event* event, bool async) {
}
pending_events_.push_back(pending_event);
} else {
+ ui::EventSource* event_source = current_host_->GetEventSource();
+ ui::EventSourceTestApi event_source_test(event_source);
ui::EventDispatchDetails details =
- current_host_->event_processor()->OnEventFromSource(event);
+ event_source_test.SendEventToProcessor(event);
CHECK(!details.dispatcher_destroyed);
}
}
« no previous file with comments | « ui/aura/test/event_generator.h ('k') | ui/aura/window_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698