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

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

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase Created 4 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/events/mojo/event_struct_traits.h ('k') | ui/events/mojo/latency_info_struct_traits.h » ('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 db0ae9bbd0a393594ba94f39cdaa80148ec8fb9c..2b6ceebeafc30b1d24efd5b93b63de52485a4b59 100644
--- a/ui/events/mojo/event_struct_traits.cc
+++ b/ui/events/mojo/event_struct_traits.cc
@@ -118,22 +118,24 @@ static_assert(ui::mojom::kEventFlagForwardMouseButton ==
static_cast<int32_t>(ui::EF_FORWARD_MOUSE_BUTTON),
"EVENT_FLAGS must match");
-ui::mojom::EventType StructTraits<ui::mojom::Event, EventUniquePtr>::action(
+ui::mojom::EventType
+StructTraits<ui::mojom::EventDataView, EventUniquePtr>::action(
const EventUniquePtr& event) {
return UIEventTypeToMojo(event->type());
}
-int32_t StructTraits<ui::mojom::Event, EventUniquePtr>::flags(
+int32_t StructTraits<ui::mojom::EventDataView, EventUniquePtr>::flags(
const EventUniquePtr& event) {
return event->flags();
}
-int64_t StructTraits<ui::mojom::Event, EventUniquePtr>::time_stamp(
+int64_t StructTraits<ui::mojom::EventDataView, EventUniquePtr>::time_stamp(
const EventUniquePtr& event) {
return event->time_stamp().ToInternalValue();
}
-ui::mojom::KeyDataPtr StructTraits<ui::mojom::Event, EventUniquePtr>::key_data(
+ui::mojom::KeyDataPtr
+StructTraits<ui::mojom::EventDataView, EventUniquePtr>::key_data(
const EventUniquePtr& event) {
if (!event->IsKeyEvent())
return nullptr;
@@ -154,7 +156,7 @@ ui::mojom::KeyDataPtr StructTraits<ui::mojom::Event, EventUniquePtr>::key_data(
}
ui::mojom::PointerDataPtr
-StructTraits<ui::mojom::Event, EventUniquePtr>::pointer_data(
+StructTraits<ui::mojom::EventDataView, EventUniquePtr>::pointer_data(
const EventUniquePtr& event) {
if (!event->IsPointerEvent() && !event->IsMouseWheelEvent())
return nullptr;
@@ -232,7 +234,7 @@ StructTraits<ui::mojom::Event, EventUniquePtr>::pointer_data(
return pointer_data;
}
-bool StructTraits<ui::mojom::Event, EventUniquePtr>::Read(
+bool StructTraits<ui::mojom::EventDataView, EventUniquePtr>::Read(
ui::mojom::EventDataView event,
EventUniquePtr* out) {
switch (event.action()) {
« no previous file with comments | « ui/events/mojo/event_struct_traits.h ('k') | ui/events/mojo/latency_info_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698