# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/features.gni")
import("//ios/web/public/js_messaging/optimize_ts.gni")
component("ios") {
public_deps = [ ":password_manager_feature_header" ]
deps = [
":account_select_fill_data",
":password_controller_js",
"//base",
"//components/autofill/core/browser",
"//components/autofill/core/common",
"//components/autofill/ios/browser",
"//components/autofill/ios/browser:util",
"//components/autofill/ios/common",
"//components/autofill/ios/form_util",
"//components/autofill/ios/form_util:form_util_feature",
"//components/password_manager/core/browser",
"//components/password_manager/core/browser/form_parsing",
"//components/password_manager/core/common",
"//components/security_state/ios",
"//components/strings:components_strings_grit",
"//components/ukm/ios:ukm_url_recorder",
"//ios/web/common",
"//ios/web/public",
"//ios/web/public/js_messaging",
"//services/metrics/public/cpp:ukm_builders",
"//ui/base",
"//url",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
sources = [
"constants.h",
"ios_password_manager_driver.h",
"ios_password_manager_driver.mm",
"ios_password_manager_driver_factory.h",
"ios_password_manager_driver_factory.mm",
"password_controller_driver_helper.h",
"password_controller_driver_helper.mm",
"password_form_helper.h",
"password_form_helper.mm",
"password_generation_provider.h",
"password_manager_client_bridge.h",
"password_manager_driver_bridge.h",
"password_manager_ios_util.h",
"password_manager_ios_util.mm",
"password_manager_java_script_feature.mm",
"password_manager_tab_helper.h",
"password_manager_tab_helper.mm",
"password_reuse_detection_manager_client_bridge.h",
"password_suggestion_helper.h",
"password_suggestion_helper.mm",
"shared_password_controller+private.h",
"shared_password_controller.h",
"shared_password_controller.mm",
]
}
source_set("password_manager_feature_header") {
deps = [
"//base",
"//components/autofill/core/common",
"//ios/web/public/js_messaging",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
sources = [ "password_manager_java_script_feature.h" ]
}
source_set("account_select_fill_data") {
deps = [
"//base",
"//components/autofill/core/common",
"//components/autofill/ios/browser:util",
"//components/password_manager/core/browser/features:password_features",
"//url",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
sources = [
"account_select_fill_data.cc",
"account_select_fill_data.h",
]
}
optimize_ts("password_controller_js") {
sources = [ "resources/password_controller.ts" ]
deps = [
"//components/autofill/ios/form_util:fill_js_dependencies",
"//ios/web/public/js_messaging:gcrweb",
]
}
static_library("test_support") {
testonly = true
sources = [
"test_helpers.cc",
"test_helpers.h",
]
deps = [
":account_select_fill_data",
":ios",
"//base",
"//components/autofill/core/common",
"//components/autofill/core/common:test_support",
"//url",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"account_select_fill_data_unittest.cc",
"ios_password_manager_driver_factory_unittest.mm",
"ios_password_manager_driver_unittest.mm",
"password_controller_driver_helper_unittest.mm",
"password_form_helper_unittest.mm",
"password_suggestion_helper_unittest.mm",
"shared_password_controller_unittest.mm",
]
deps = [
":account_select_fill_data",
":ios",
":test_support",
"//base",
"//base/test:test_support",
"//components/autofill/core/common",
"//components/autofill/core/common:test_support",
"//components/autofill/ios/browser",
"//components/autofill/ios/browser:test_support",
"//components/autofill/ios/browser:util",
"//components/autofill/ios/common",
"//components/autofill/ios/form_util",
"//components/autofill/ios/form_util:child_frame_registrar",
"//components/autofill/ios/form_util:form_handler_feature",
"//components/autofill/ios/form_util:form_util_feature",
"//components/autofill/ios/form_util:test_support",
"//components/password_manager/core/browser",
"//components/password_manager/core/browser:test_support",
"//components/password_manager/core/browser/features:password_features",
"//components/password_manager/core/common:features",
"//components/password_manager/ios:password_manager_feature_header",
"//components/password_manager/ios:test_support",
"//components/ukm:test_support",
"//components/ukm/ios:ukm_url_recorder",
"//ios/chrome/browser/shared/model/browser_state",
"//ios/web/js_messaging",
"//ios/web/js_messaging:java_script_feature_manager_header",
"//ios/web/public/js_messaging",
"//ios/web/public/test",
"//ios/web/public/test:test_fixture",
"//ios/web/public/test/fakes",
"//services/metrics/public/cpp:ukm_builders",
"//testing/gmock",
"//testing/gtest",
"//third_party/ocmock",
]
}
source_set("fake_bulk_leak_check_service") {
testonly = true
sources = [
"fake_bulk_leak_check_service.h",
"fake_bulk_leak_check_service.mm",
]
deps = [
"//base",
"//components/password_manager/core/browser/leak_detection:leak_detection_interface_headers",
]
}