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 class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventType, ui::EventType> {
18 static EventType ConvertFrom(ui::EventType type);
19 static ui::EventType ConvertTo(EventType type);
23 class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::Event> {
25 static EventPtr ConvertFrom(const ui::Event& input);
29 class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr, ui::KeyEvent> {
31 static EventPtr ConvertFrom(const ui::KeyEvent& input);
35 class MOJO_INPUT_EVENTS_EXPORT TypeConverter<EventPtr,
36 scoped_ptr<ui::Event> > {
38 static scoped_ptr<ui::Event> ConvertTo(const EventPtr& input);
43 #endif // MOJO_SERVICES_PUBLIC_CPP_INPUT_EVENTS_INPUT_EVENTS_TYPE_CONVERTERS_H_