chromium/ios/chrome/browser/first_run/ui_bundled/omnibox_position/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("omnibox_position") {
  sources = [
    "omnibox_position_choice_coordinator.h",
    "omnibox_position_choice_coordinator.mm",
    "omnibox_position_choice_mediator.h",
    "omnibox_position_choice_mediator.mm",
  ]
  deps = [
    ":omnibox_position_ui",
    "//components/feature_engagement/public",
    "//components/prefs",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/first_run/ui_bundled:interruptible_chrome_coordinator",
    "//ios/chrome/browser/first_run/ui_bundled:screen_delegate",
    "//ios/chrome/browser/segmentation_platform/model",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
  ]
}

source_set("omnibox_position_ui") {
  sources = [
    "metrics.h",
    "metrics.mm",
    "omnibox_position_choice_consumer.h",
    "omnibox_position_choice_mutator.h",
    "omnibox_position_choice_view_controller.h",
    "omnibox_position_choice_view_controller.mm",
  ]
  deps = [
    "//components/prefs",
    "//components/search_engines",
    "//components/segmentation_platform/embedder/default_model",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/first_run/model",
    "//ios/chrome/browser/first_run/ui_bundled:constants",
    "//ios/chrome/browser/search_engines/model",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/utils",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/public/features:system_flags",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/ui/settings/address_bar_preference/cells",
    "//ios/chrome/browser/ui/toolbar/public",
    "//ios/chrome/common/ui/promo_style",
    "//ios/chrome/common/ui/util",
    "//ui/base",
  ]
}

source_set("eg_app_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "omnibox_position_choice_app_interface.h",
    "omnibox_position_choice_app_interface.mm",
  ]
  deps = [
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/test/app:test_support",
  ]
}

source_set("eg_test_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "omnibox_position_choice_app_interface.h",
    "omnibox_position_choice_app_interface_stub.mm",
  ]
  deps = [ "//ios/testing/earl_grey:eg_test_support+eg2" ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "omnibox_position_egtest.mm" ]
  deps = [
    ":eg_test_support+eg2",
    "//base",
    "//build:branding_buildflags",
    "//components/search_engines:search_engines_switches",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/first_run/ui_bundled:constants",
    "//ios/chrome/browser/promos_manager/model:features",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
    "//ios/chrome/common/ui/promo_style:constants",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/chrome/test/earl_grey:switches",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:launch_configuration",
    "//ui/base",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "metrics_unittest.mm" ]
  deps = [
    ":omnibox_position_ui",
    "//base/test:test_support",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/segmentation_platform/embedder/default_model",
    "//components/segmentation_platform/public",
    "//components/segmentation_platform/public:test_support",
    "//components/sync_device_info",
    "//components/sync_device_info:test_support",
    "//ios/chrome/browser/shared/model/utils:test_support",
    "//testing/gtest",
  ]
}