# 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.
import("//mojo/public/tools/bindings/mojom.gni")
import("//build/config/features.gni")
mojom("mojo_types") {
generate_java = true
sources = [ "autofill_types.mojom" ]
public_deps = [
"//mojo/public/mojom/base",
"//ui/gfx/geometry/mojom",
"//url/mojom:url_mojom_gurl",
"//url/mojom:url_mojom_origin",
]
enabled_features = []
if (is_arkweb) {
enabled_features += [ "arkweb_password_autofill" ]
}
cpp_typemaps = [
{
types = [
{
mojom = "autofill.mojom.FormData"
cpp = "::autofill::FormData"
},
{
mojom = "autofill.mojom.FormDataPredictions"
cpp = "::autofill::FormDataPredictions"
},
{
mojom = "autofill.mojom.FormFieldData"
cpp = "::autofill::FormFieldData"
},
{
mojom = "autofill.mojom.FormFieldData_FillData"
cpp = "::autofill::FormFieldData::FillData"
},
{
mojom = "autofill.mojom.FormFieldDataPredictions"
cpp = "::autofill::FormFieldDataPredictions"
},
{
mojom = "autofill.mojom.FormRendererId"
cpp = "::autofill::FormRendererId"
copyable_pass_by_value = true
},
{
mojom = "autofill.mojom.FieldRendererId"
cpp = "::autofill::FieldRendererId"
copyable_pass_by_value = true
},
{
mojom = "autofill.mojom.ParsingResult"
cpp = "::autofill::ParsingResult"
},
{
mojom = "autofill.mojom.PasswordAndMetadata"
cpp = "::autofill::PasswordAndMetadata"
},
{
mojom = "autofill.mojom.PasswordFormFillData"
cpp = "::autofill::PasswordFormFillData"
},
{
mojom = "autofill.mojom.PasswordFormGenerationData"
cpp = "::autofill::PasswordFormGenerationData"
},
{
mojom = "autofill.mojom.PasswordGenerationUIData"
cpp = "::autofill::password_generation::PasswordGenerationUIData"
},
{
mojom = "autofill.mojom.PasswordSuggestionRequest"
cpp = "::autofill::PasswordSuggestionRequest"
},
# ARKWEB_PASSWORD_AUTOFILL begin
{
mojom = "autofill.mojom.InputFillRequestData"
cpp = "::autofill::InputFillRequestData"
},
# ARKWEB_PASSWORD_AUTOFILL end
]
traits_headers = [ "autofill_types_mojom_traits.h" ]
traits_sources = [ "autofill_types_mojom_traits.cc" ]
traits_public_deps = [
"//base",
"//base:i18n",
"//components/autofill/core/common",
"//third_party/abseil-cpp:absl",
"//ui/gfx/geometry/mojom:mojom_traits",
]
},
]
}
mojom("mojo_test_types") {
sources = [ "test_autofill_types.mojom" ]
public_deps = [ ":mojo_types" ]
}
source_set("unit_tests") {
testonly = true
sources = [ "autofill_types_mojom_traits_unittest.cc" ]
public_deps = [ ":mojo_test_types" ]
deps = [
"//base",
"//base/test:test_support",
"//components/autofill/core/browser:test_support",
"//components/password_manager/core/common",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/test_support:test_utils",
"//testing/gtest",
]
# TODO(crbug.com/40031409): Fix code that adds exit-time destructors and
# enable the diagnostic by removing this line.
configs += [ "//build/config/compiler:no_exit_time_destructors" ]
}