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

Unified Diff: ui/events/mojo/event_struct_traits.cc

Issue 2765773002: Adds KeyEvent::properties (Closed)
Patch Set: Created 3 years, 9 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: ui/events/mojo/event_struct_traits.cc
diff --git a/ui/events/mojo/event_struct_traits.cc b/ui/events/mojo/event_struct_traits.cc
index d7c54b48ff82673da49f67ef8a776edb66d473ce..61787d1a57f1c710bd961d807762ed88e8b91243 100644
--- a/ui/events/mojo/event_struct_traits.cc
+++ b/ui/events/mojo/event_struct_traits.cc
@@ -161,6 +161,8 @@ StructTraits<ui::mojom::EventDataView, EventUniquePtr>::key_data(
key_event->GetLocatedWindowsKeyboardCode());
key_data->text = key_event->GetText();
key_data->unmodified_text = key_event->GetUnmodifiedText();
+ if (key_event->properties())
+ key_data->properties = *(key_event->properties());
return key_data;
}
@@ -261,6 +263,8 @@ bool StructTraits<ui::mojom::EventDataView, EventUniquePtr>::Read(
static_cast<ui::KeyboardCode>(key_data->key_code), event.flags(),
base::TimeTicks::FromInternalValue(event.time_stamp())));
}
+ if (key_data->properties)
+ (*out)->AsKeyEvent()->SetProperties(*key_data->properties);
break;
}
case ui::mojom::EventType::POINTER_DOWN:

Powered by Google App Engine
This is Rietveld 408576698