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

Unified Diff: mojo/converters/input_events/input_events_type_converters.cc

Issue 789363004: WindowManagerApp should recognize gestures (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: build fix Created 5 years, 11 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
Index: mojo/converters/input_events/input_events_type_converters.cc
diff --git a/mojo/converters/input_events/input_events_type_converters.cc b/mojo/converters/input_events/input_events_type_converters.cc
index cd783860b97f7c06e97f42c7ce306f7d862ef4fb..ac9390650311169266be0165537a0d83c63e5e19 100644
--- a/mojo/converters/input_events/input_events_type_converters.cc
+++ b/mojo/converters/input_events/input_events_type_converters.cc
@@ -96,7 +96,7 @@ EventPtr TypeConverter<EventPtr, ui::Event>::Convert(const ui::Event& input) {
event->flags = EventFlags(input.flags());
event->time_stamp = input.time_stamp().ToInternalValue();
- if (input.IsMouseEvent() || input.IsTouchEvent()) {
+ if (input.IsMouseEvent() || input.IsTouchEvent() || input.IsGestureEvent()) {
const ui::LocatedEvent* located_event =
static_cast<const ui::LocatedEvent*>(&input);
@@ -158,6 +158,12 @@ EventPtr TypeConverter<EventPtr, ui::KeyEvent>::Convert(
}
// static
+EventPtr TypeConverter<EventPtr, ui::GestureEvent>::Convert(
+ const ui::GestureEvent& input) {
+ return Event::From(static_cast<const ui::Event&>(input));
+}
+
+// static
scoped_ptr<ui::Event> TypeConverter<scoped_ptr<ui::Event>, EventPtr>::Convert(
const EventPtr& input) {
scoped_ptr<ui::Event> ui_event;

Powered by Google App Engine
This is Rietveld 408576698