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

Side by Side Diff: ui/events/mojo/event_struct_traits.h

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, 3 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 unified diff | Download patch
« no previous file with comments | « ui/events/mojo/OWNERS ('k') | ui/events/mojo/event_struct_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_MOJO_EVENT_STRUCT_TRAITS_H_ 5 #ifndef UI_EVENTS_MOJO_EVENT_STRUCT_TRAITS_H_
6 #define UI_EVENTS_MOJO_EVENT_STRUCT_TRAITS_H_ 6 #define UI_EVENTS_MOJO_EVENT_STRUCT_TRAITS_H_
7 7
8 #include "ui/events/mojo/event.mojom.h" 8 #include "ui/events/mojo/event.mojom.h"
9 9
10 namespace ui { 10 namespace ui {
11 class Event; 11 class Event;
12 } 12 }
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 using EventUniquePtr = std::unique_ptr<ui::Event>; 16 using EventUniquePtr = std::unique_ptr<ui::Event>;
17 17
18 template <> 18 template <>
19 struct StructTraits<ui::mojom::Event, EventUniquePtr> { 19 struct StructTraits<ui::mojom::EventDataView, EventUniquePtr> {
20 static ui::mojom::EventType action(const EventUniquePtr& event); 20 static ui::mojom::EventType action(const EventUniquePtr& event);
21 static int32_t flags(const EventUniquePtr& event); 21 static int32_t flags(const EventUniquePtr& event);
22 static int64_t time_stamp(const EventUniquePtr& event); 22 static int64_t time_stamp(const EventUniquePtr& event);
23 static ui::mojom::KeyDataPtr key_data(const EventUniquePtr& event); 23 static ui::mojom::KeyDataPtr key_data(const EventUniquePtr& event);
24 static ui::mojom::PointerDataPtr pointer_data(const EventUniquePtr& event); 24 static ui::mojom::PointerDataPtr pointer_data(const EventUniquePtr& event);
25 static bool Read(ui::mojom::EventDataView r, EventUniquePtr* out); 25 static bool Read(ui::mojom::EventDataView r, EventUniquePtr* out);
26 }; 26 };
27 27
28 } // namespace mojo 28 } // namespace mojo
29 29
30 #endif // UI_EVENTS_MOJO_EVENT_STRUCT_TRAITS_H_ 30 #endif // UI_EVENTS_MOJO_EVENT_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « ui/events/mojo/OWNERS ('k') | ui/events/mojo/event_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698