chromium/ios/chrome/browser/ui/settings/password/password_sharing/BUILD.gn

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

source_set("password_sharing") {
  sources = [
    "family_picker_coordinator.h",
    "family_picker_coordinator.mm",
    "family_picker_coordinator_delegate.h",
    "family_picker_mediator.h",
    "family_picker_mediator.mm",
    "family_promo_coordinator.h",
    "family_promo_coordinator.mm",
    "family_promo_coordinator_delegate.h",
    "family_promo_mediator.h",
    "family_promo_mediator.mm",
    "password_picker_coordinator.h",
    "password_picker_coordinator.mm",
    "password_picker_coordinator_delegate.h",
    "password_picker_mediator.h",
    "password_picker_mediator.mm",
    "password_sharing_coordinator.h",
    "password_sharing_coordinator.mm",
    "password_sharing_coordinator_delegate.h",
    "password_sharing_first_run_coordinator.h",
    "password_sharing_first_run_coordinator.mm",
    "password_sharing_first_run_coordinator_delegate.h",
    "password_sharing_mediator.h",
    "password_sharing_mediator.mm",
    "password_sharing_mediator_delegate.h",
    "sharing_status_coordinator.h",
    "sharing_status_coordinator.mm",
    "sharing_status_coordinator_delegate.h",
    "sharing_status_mediator.h",
    "sharing_status_mediator.mm",
  ]
  deps = [
    ":password_sharing_constants",
    ":password_sharing_metrics",
    ":password_sharing_ui",
    ":password_sharing_util",
    "//components/image_fetcher/core",
    "//components/image_fetcher/ios",
    "//components/password_manager/core/browser",
    "//components/password_manager/core/browser/sharing",
    "//components/strings",
    "//components/version_info:channel",
    "//ios/chrome/app:tests_hook",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/favicon/model",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/passwords/model:sharing_factory",
    "//ios/chrome/browser/shared/coordinator/alert",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/ui/authentication:authentication_constants",
    "//ios/chrome/common:common",
    "//ios/chrome/common/ui/confirmation_alert",
    "//ios/chrome/common/ui/favicon:favicon_constants",
    "//ui/base",
    "//ui/gfx",
  ]
}

source_set("password_sharing_ui") {
  sources = [
    "family_picker_consumer.h",
    "family_picker_view_controller.h",
    "family_picker_view_controller.mm",
    "family_picker_view_controller_presentation_delegate.h",
    "family_promo_action_handler.h",
    "family_promo_consumer.h",
    "family_promo_view_controller.h",
    "family_promo_view_controller.mm",
    "password_picker_consumer.h",
    "password_picker_view_controller.h",
    "password_picker_view_controller.mm",
    "password_picker_view_controller_presentation_delegate.h",
    "password_sharing_first_run_action_handler.h",
    "password_sharing_first_run_view_controller.h",
    "password_sharing_first_run_view_controller.mm",
    "recipient_info.h",
    "recipient_info.mm",
    "sharing_status_consumer.h",
    "sharing_status_view_controller.h",
    "sharing_status_view_controller.mm",
    "sharing_status_view_controller_presentation_delegate.h",
  ]
  deps = [
    ":password_sharing_constants",
    ":password_sharing_metrics",
    "//components/password_manager/core/browser",
    "//components/password_manager/core/browser/sharing",
    "//components/strings",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/shared/ui/bottom_sheet:table_view_bottom_sheet_view_controller",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/authentication:authentication_constants",
    "//ios/chrome/browser/ui/settings/cells",
    "//ios/chrome/browser/ui/settings/password/password_sharing/resources",
    "//ios/chrome/common:string_util",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/confirmation_alert",
    "//ios/chrome/common/ui/elements:popover_label_view_controller",
    "//ios/chrome/common/ui/favicon",
    "//ios/chrome/common/ui/table_view:cells_constants",
    "//ios/chrome/common/ui/util",
    "//ui/base",
  ]
}

source_set("password_sharing_constants") {
  sources = [
    "password_sharing_constants.h",
    "password_sharing_constants.mm",
  ]
}

source_set("password_sharing_metrics") {
  sources = [
    "password_sharing_metrics.h",
    "password_sharing_metrics.mm",
  ]
  deps = [ "//base" ]
}

source_set("password_sharing_util") {
  sources = [
    "multi_avatar_image_util.h",
    "multi_avatar_image_util.mm",
  ]
  deps = [
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
  ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "password_sharing_egtest.mm" ]
  deps = [
    ":password_sharing_constants",
    "//base/test:test_support",
    "//build:branding_buildflags",
    "//components/password_manager/core/browser:password_switches",
    "//components/password_manager/core/common",
    "//components/sync/base:features",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
    "//ios/chrome/browser/ui/settings/elements:constants",
    "//ios/chrome/browser/ui/settings/password:eg_test_support",
    "//ios/chrome/browser/ui/settings/password:eg_test_support+eg2",
    "//ios/chrome/browser/ui/settings/password/password_details:password_details_table_view_constants",
    "//ios/chrome/common:string_util",
    "//ios/chrome/common/ui/confirmation_alert:constants",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/chrome/test/earl_grey:switches",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ui/base",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "family_picker_coordinator_unittest.mm",
    "family_picker_view_controller_unittest.mm",
    "family_promo_coordinator_unittest.mm",
    "password_picker_view_controller_unittest.mm",
    "password_sharing_first_run_coordinator_unittest.mm",
    "sharing_status_coordinator_unittest.mm",
    "sharing_status_mediator_unittest.mm",
  ]
  deps = [
    ":password_sharing",
    ":password_sharing_metrics",
    ":password_sharing_ui",
    "//base/test:test_support",
    "//components/password_manager/core/browser",
    "//components/password_manager/core/browser/sharing",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/favicon/model",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view:test_support",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/table_view/cells:cells",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/signin/model:fake_system_identity_manager",
    "//ios/chrome/browser/signin/model:test_support",
    "//ios/chrome/browser/ui/authentication:authentication_constants",
    "//ios/chrome/browser/ui/settings/cells",
    "//ios/chrome/test:test_support",
    "//ios/chrome/test/fakes",
    "//ios/web/public/test",
    "//third_party/ocmock:ocmock",
    "//ui/base",
  ]
}