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.
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_
6 #define MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/services/public/cpp/input_events/mojo_input_events_export.h"
10 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h"
11 #include "ui/events/event.h"
16 struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventType, ui::EventType> {
17 static EventType Convert(ui::EventType type);
21 struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<ui::EventType, EventType> {
22 static ui::EventType Convert(EventType type);
26 struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::Event> {
27 static EventPtr Convert(const ui::Event& input);
31 struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::KeyEvent> {
32 static EventPtr Convert(const ui::KeyEvent& input);
36 struct MOJO_INPUT_EVENTS_EXPORT TypeConverter<scoped_ptr<ui::Event>, EventPtr> {
37 static scoped_ptr<ui::Event> Convert(const EventPtr& input);
42 #endif // MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_