OLD | NEW |
1 // Copyright 2014 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 MOJO_CONVERTERS_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_ | 5 #ifndef UI_EVENTS_MOJO_INPUT_EVENTS_TYPE_CONVERTERS_H_ |
6 #define MOJO_CONVERTERS_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_ | 6 #define UI_EVENTS_MOJO_INPUT_EVENTS_TYPE_CONVERTERS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "components/mus/public/interfaces/input_events.mojom.h" | 10 #include "components/mus/public/interfaces/input_events.mojom.h" |
11 #include "mojo/converters/input_events/mojo_input_events_export.h" | |
12 #include "ui/events/event.h" | 11 #include "ui/events/event.h" |
| 12 #include "ui/events/mojo/mojo_input_events_export.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 | 15 |
16 // NOTE: the mojo input events do not necessarily provide a 1-1 mapping with | 16 // NOTE: the mojo input events do not necessarily provide a 1-1 mapping with |
17 // ui::Event types. Be careful in using them! | 17 // ui::Event types. Be careful in using them! |
18 template <> | 18 template <> |
19 struct MOJO_INPUT_EVENTS_EXPORT | 19 struct MOJO_INPUT_EVENTS_EXPORT |
20 TypeConverter<mus::mojom::EventType, ui::EventType> { | 20 TypeConverter<mus::mojom::EventType, ui::EventType> { |
21 static mus::mojom::EventType Convert(ui::EventType type); | 21 static mus::mojom::EventType Convert(ui::EventType type); |
22 }; | 22 }; |
(...skipping 16 matching lines...) Expand all Loading... |
39 }; | 39 }; |
40 | 40 |
41 template <> | 41 template <> |
42 struct MOJO_INPUT_EVENTS_EXPORT | 42 struct MOJO_INPUT_EVENTS_EXPORT |
43 TypeConverter<std::unique_ptr<ui::Event>, mus::mojom::EventPtr> { | 43 TypeConverter<std::unique_ptr<ui::Event>, mus::mojom::EventPtr> { |
44 static std::unique_ptr<ui::Event> Convert(const mus::mojom::EventPtr& input); | 44 static std::unique_ptr<ui::Event> Convert(const mus::mojom::EventPtr& input); |
45 }; | 45 }; |
46 | 46 |
47 } // namespace mojo | 47 } // namespace mojo |
48 | 48 |
49 #endif // MOJO_CONVERTERS_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_ | 49 #endif // UI_EVENTS_MOJO_INPUT_EVENTS_TYPE_CONVERTERS_H_ |
OLD | NEW |