chromium/components/autofill/core/common/mojom/autofill_types_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 COMPONENTS_AUTOFILL_CORE_COMMON_MOJOM_AUTOFILL_TYPES_MOJOM_TRAITS_H_
#define COMPONENTS_AUTOFILL_CORE_COMMON_MOJOM_AUTOFILL_TYPES_MOJOM_TRAITS_H_

#include <map>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "base/i18n/rtl.h"
#include "components/autofill/core/common/aliases.h"
#include "components/autofill/core/common/autocomplete_parsing_util.h"
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_data_predictions.h"
#include "components/autofill/core/common/form_field_data_predictions.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
#include "components/autofill/core/common/password_form_fill_data.h"
#include "components/autofill/core/common/password_form_generation_data.h"
#include "components/autofill/core/common/password_generation_util.h"
#include "components/autofill/core/common/unique_ids.h"
#include "mojo/public/cpp/base/text_direction_mojom_traits.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/mojom/base/unguessable_token.mojom-shared.h"
#include "ui/gfx/geometry/rect_f.h"

namespace mojo {

template <>
struct StructTraits<autofill::mojom::FrameTokenDataView, autofill::FrameToken> {};

template <>
struct StructTraits<autofill::mojom::FrameTokenWithPredecessorDataView,
                    autofill::FrameTokenWithPredecessor> {};

template <>
struct StructTraits<autofill::mojom::FormRendererIdDataView,
                    autofill::FormRendererId> {};

template <>
struct StructTraits<autofill::mojom::FieldRendererIdDataView,
                    autofill::FieldRendererId> {};

template <>
struct StructTraits<autofill::mojom::SelectOptionDataView,
                    autofill::SelectOption> {};

template <>
struct UnionTraits<autofill::mojom::SectionValueDataView,
                   autofill::Section::SectionValue> {};

template <>
struct StructTraits<autofill::mojom::SectionAutocompleteDataView,
                    autofill::Section::Autocomplete> {};

template <>
struct StructTraits<autofill::mojom::SectionFieldIdentifierDataView,
                    autofill::Section::FieldIdentifier> {};

template <>
struct StructTraits<autofill::mojom::SectionDataView, autofill::Section> {};

template <>
struct StructTraits<autofill::mojom::AutocompleteParsingResultDataView,
                    autofill::AutocompleteParsingResult> {};

template <>
struct StructTraits<autofill::mojom::FormFieldDataDataView,
                    autofill::FormFieldData> {};

template <>
struct StructTraits<autofill::mojom::FormFieldData_FillDataDataView,
                    autofill::FormFieldData::FillData> {};

template <>
struct StructTraits<autofill::mojom::ButtonTitleInfoDataView,
                    autofill::ButtonTitleInfo> {};

template <>
struct StructTraits<autofill::mojom::FormDataDataView, autofill::FormData> {};

template <>
struct StructTraits<autofill::mojom::FormFieldDataPredictionsDataView,
                    autofill::FormFieldDataPredictions> {};

template <>
struct StructTraits<autofill::mojom::FormDataPredictionsDataView,
                    autofill::FormDataPredictions> {};

template <>
struct StructTraits<autofill::mojom::PasswordAndMetadataDataView,
                    autofill::PasswordAndMetadata> {};

template <>
struct StructTraits<autofill::mojom::PasswordFormFillDataDataView,
                    autofill::PasswordFormFillData> {};

template <>
struct StructTraits<autofill::mojom::PasswordFormGenerationDataDataView,
                    autofill::PasswordFormGenerationData> {};

template <>
struct StructTraits<autofill::mojom::PasswordGenerationUIDataDataView,
                    autofill::password_generation::PasswordGenerationUIData> {};

template <>
struct StructTraits<autofill::mojom::PasswordSuggestionRequestDataView,
                    autofill::PasswordSuggestionRequest> {};

template <>
struct StructTraits<autofill::mojom::ParsingResultDataView,
                    autofill::ParsingResult> {};

}  // namespace mojo

#endif  // COMPONENTS_AUTOFILL_CORE_COMMON_MOJOM_AUTOFILL_TYPES_MOJOM_TRAITS_H_