chromium/ios/chrome/browser/ui/browser_container/BUILD.gn

# 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("//ios/build/chrome_build.gni")

source_set("browser_container") {
  sources = [
    "browser_container_coordinator.h",
    "browser_container_coordinator.mm",
    "browser_container_mediator.h",
    "browser_container_mediator.mm",
  ]

  deps = [
    ":edit_menu_alert_delegate",
    ":ui",
    "//base",
    "//components/search_engines",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/link_to_text/model",
    "//ios/chrome/browser/link_to_text/ui_bundled",
    "//ios/chrome/browser/main/model",
    "//ios/chrome/browser/overlays/model",
    "//ios/chrome/browser/overlays/model/public/web_content_area",
    "//ios/chrome/browser/overlays/ui_bundled",
    "//ios/chrome/browser/screen_time/model:buildflags",
    "//ios/chrome/browser/search_engines/model:template_url_service_factory",
    "//ios/chrome/browser/shared/coordinator/alert",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/ui/fullscreen",
    "//ios/chrome/browser/ui/partial_translate",
    "//ios/chrome/browser/ui/search_with",
    "//ios/web/public",
    "//ui/base",
    "//ui/strings:ui_strings_grit",
    "//url",
  ]

  if (ios_enable_screen_time) {
    deps += [
      "//ios/chrome/browser/screen_time/model:feature_flags",
      "//ios/chrome/browser/screen_time/ui_bundled",
    ]
  }
}

source_set("ui") {
  sources = [
    "browser_container_consumer.h",
    "browser_container_view_controller.h",
    "browser_container_view_controller.mm",
    "browser_edit_menu_handler.h",
    "browser_edit_menu_handler.mm",
  ]

  deps = [
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/link_to_text/ui_bundled",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/partial_translate",
    "//ios/chrome/browser/ui/search_with",
    "//ios/chrome/common/ui/util",
    "//ui/base",
  ]
}

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

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

source_set("unit_tests") {
  testonly = true

  sources = [
    "browser_container_coordinator_unittest.mm",
    "browser_container_mediator_unittest.mm",
    "browser_container_view_controller_unittest.mm",
    "browser_edit_menu_handler_unittest.mm",
  ]

  deps = [
    ":browser_container",
    ":edit_menu_alert_delegate",
    ":ui",
    "//base/test:test_support",
    "//components/sync_preferences:test_support",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/link_to_text/model",
    "//ios/chrome/browser/link_to_text/ui_bundled",
    "//ios/chrome/browser/overlays/model",
    "//ios/chrome/browser/overlays/model/public/web_content_area",
    "//ios/chrome/browser/overlays/model/test",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/model/web_state_list/test:test_support",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/ui/partial_translate",
    "//ios/chrome/browser/web/model:web_internal",
    "//ios/chrome/test:test_support",
    "//ios/chrome/test/providers/partial_translate",
    "//ios/web/public/test",
    "//ios/web/public/test/fakes",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
    "//ui/strings:ui_strings_grit",
  ]
}

source_set("eg_test_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true

  sources = [
    "edit_menu_app_interface.h",
    "edit_menu_app_interface_stub.mm",
  ]
  deps = [ "//ios/testing/earl_grey:eg_test_support+eg2" ]
}

source_set("eg_app_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "edit_menu_app_interface.h",
    "edit_menu_app_interface.mm",
  ]
  deps = [
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/test/app:test_support",
    "//ios/testing/earl_grey:eg_app_support+eg2",
    "//ios/third_party/earl_grey2:app_framework+link",
    "//ui/base",
  ]
}