chromium/ui/base/ime/mojom/ime_types_mojom_traits.h

// Copyright 2019 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_BASE_IME_MOJOM_IME_TYPES_MOJOM_TRAITS_H_
#define UI_BASE_IME_MOJOM_IME_TYPES_MOJOM_TRAITS_H_

#include <vector>

#include "base/component_export.h"
#include "ui/base/ime/ime_text_span.h"
#include "ui/base/ime/mojom/ime_types.mojom-shared.h"
#include "ui/base/ime/text_input_action.h"
#include "ui/base/ime/text_input_mode.h"
#include "ui/base/ime/text_input_type.h"

namespace mojo {

template <>
struct COMPONENT_EXPORT(IME_SHARED_MOJOM_TRAITS)
    EnumTraits<ui::mojom::TextInputMode, ui::TextInputMode> {};

template <>
struct COMPONENT_EXPORT(IME_SHARED_MOJOM_TRAITS)
    EnumTraits<ui::mojom::TextInputAction, ui::TextInputAction> {};

template <>
struct COMPONENT_EXPORT(IME_SHARED_MOJOM_TRAITS)
    EnumTraits<ui::mojom::TextInputType, ui::TextInputType> {};

template <>
struct COMPONENT_EXPORT(IME_SHARED_MOJOM_TRAITS)
    StructTraits<ui::mojom::ImeTextSpanDataView, ui::ImeTextSpan> {};

template <>
struct COMPONENT_EXPORT(IME_SHARED_MOJOM_TRAITS)
    EnumTraits<ui::mojom::ImeTextSpanType, ui::ImeTextSpan::Type> {};

template <>
struct COMPONENT_EXPORT(IME_SHARED_MOJOM_TRAITS)
    EnumTraits<ui::mojom::ImeTextSpanThickness, ui::ImeTextSpan::Thickness> {};

template <>
struct COMPONENT_EXPORT(IME_SHARED_MOJOM_TRAITS)
    EnumTraits<ui::mojom::ImeTextSpanUnderlineStyle,
               ui::ImeTextSpan::UnderlineStyle> {};

}  // namespace mojo

#endif  // UI_BASE_IME_MOJOM_IME_TYPES_MOJOM_TRAITS_H_