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

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

Issue 2752093004: Makes KeyEvent struct traits restore Event::time_stamp() field (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
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/mojo/struct_traits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e81158df599a44f0af2a026a83690895e7366b3..c73d292bba371a725d70b2b2421c5af62e2e8825 100644
--- a/ui/events/mojo/event_struct_traits.cc
+++ b/ui/events/mojo/event_struct_traits.cc
@@ -250,14 +250,16 @@ bool StructTraits<ui::mojom::EventDataView, EventUniquePtr>::Read(
if (key_data->is_char) {
out->reset(new ui::KeyEvent(
static_cast<base::char16>(key_data->character),
- static_cast<ui::KeyboardCode>(key_data->key_code), event.flags()));
+ static_cast<ui::KeyboardCode>(key_data->key_code), event.flags(),
+ base::TimeTicks::FromInternalValue(event.time_stamp())));
} else {
out->reset(new ui::KeyEvent(
event.action() == ui::mojom::EventType::KEY_PRESSED
? ui::ET_KEY_PRESSED
: ui::ET_KEY_RELEASED,
- static_cast<ui::KeyboardCode>(key_data->key_code), event.flags()));
+ static_cast<ui::KeyboardCode>(key_data->key_code), event.flags(),
+ base::TimeTicks::FromInternalValue(event.time_stamp())));
}
break;
}
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/mojo/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698