chromium/ui/events/mojom/event_mojom_traits.h

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_EVENTS_MOJOM_EVENT_MOJOM_TRAITS_H_
#define UI_EVENTS_MOJOM_EVENT_MOJOM_TRAITS_H_

#include <stdint.h>

#include <string>

#include "base/containers/flat_map.h"
#include "base/notreached.h"
#include "mojo/public/cpp/bindings/type_converter.h"
#include "ui/events/event_constants.h"
#include "ui/events/mojom/event.mojom.h"
#include "ui/events/mojom/event_constants.mojom.h"
#include "ui/events/pointer_details.h"
#include "ui/events/types/event_type.h"

namespace ui {
class Event;
class LatencyInfo;
}

namespace mojo {

EventUniquePtr;

template <>
struct TypeConverter<ui::mojom::EventType, ui::EventType> {};

template <>
struct TypeConverter<ui::EventType, ui::mojom::EventType> {};

template <>
struct StructTraits<ui::mojom::EventDataView, EventUniquePtr> {};

template <>
struct EnumTraits<ui::mojom::EventMomentumPhase, ui::EventMomentumPhase> {};

template <>
struct StructTraits<ui::mojom::PointerDetailsDataView, ui::PointerDetails> {};

template <>
struct EnumTraits<ui::mojom::ScrollEventPhase, ui::ScrollEventPhase> {};

template <>
struct EnumTraits<ui::mojom::GestureDeviceType, ui::GestureDeviceType> {};

}  // namespace mojo

#endif  // UI_EVENTS_MOJOM_EVENT_MOJOM_TRAITS_H_