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

Side by Side Diff: mojo/converters/input_events/input_events_type_converters.h

Issue 2014003002: mojo/converters/input_events -> ui/events/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@converters
Patch Set: . Created 4 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_CONVERTERS_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_
6 #define MOJO_CONVERTERS_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_
7
8 #include <memory>
9
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"
13
14 namespace mojo {
15
16 // NOTE: the mojo input events do not necessarily provide a 1-1 mapping with
17 // ui::Event types. Be careful in using them!
18 template <>
19 struct MOJO_INPUT_EVENTS_EXPORT
20 TypeConverter<mus::mojom::EventType, ui::EventType> {
21 static mus::mojom::EventType Convert(ui::EventType type);
22 };
23
24 template <>
25 struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<mus::mojom::EventPtr, ui::Event> {
26 static mus::mojom::EventPtr Convert(const ui::Event& input);
27 };
28
29 template <>
30 struct MOJO_INPUT_EVENTS_EXPORT
31 TypeConverter<mus::mojom::EventPtr, ui::KeyEvent> {
32 static mus::mojom::EventPtr Convert(const ui::KeyEvent& input);
33 };
34
35 template <>
36 struct MOJO_INPUT_EVENTS_EXPORT
37 TypeConverter<mus::mojom::EventPtr, ui::GestureEvent> {
38 static mus::mojom::EventPtr Convert(const ui::GestureEvent& input);
39 };
40
41 template <>
42 struct MOJO_INPUT_EVENTS_EXPORT
43 TypeConverter<std::unique_ptr<ui::Event>, mus::mojom::EventPtr> {
44 static std::unique_ptr<ui::Event> Convert(const mus::mojom::EventPtr& input);
45 };
46
47 } // namespace mojo
48
49 #endif // MOJO_CONVERTERS_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_
OLDNEW
« no previous file with comments | « mojo/converters/input_events/DEPS ('k') | mojo/converters/input_events/input_events_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698