chromium/ios/chrome/browser/ui/tab_switcher/tab_grid/inactive_tabs/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.

import("//build/config/apple/swift_source_set.gni")

source_set("inactive_tabs") {
  sources = [
    "inactive_tabs_coordinator.h",
    "inactive_tabs_coordinator.mm",
    "inactive_tabs_mediator.h",
    "inactive_tabs_mediator.mm",
    "inactive_tabs_user_education_coordinator.h",
    "inactive_tabs_user_education_coordinator.mm",
  ]
  deps = [
    ":inactive_tabs_button_ui",
    ":inactive_tabs_constants",
    ":inactive_tabs_delegate",
    ":inactive_tabs_ui",
    "//base",
    "//base:i18n",
    "//components/prefs",
    "//components/prefs/ios",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/crash_report/model",
    "//ios/chrome/browser/shared/coordinator/alert",
    "//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/prefs:pref_names",
    "//ios/chrome/browser/shared/model/url",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/snapshots/model",
    "//ios/chrome/browser/snapshots/model:model_common",
    "//ios/chrome/browser/snapshots/model:model_swift",
    "//ios/chrome/browser/tabs/model",
    "//ios/chrome/browser/tabs/model/inactive_tabs:features",
    "//ios/chrome/browser/ui/settings:settings_root",
    "//ios/chrome/browser/ui/tab_switcher",
    "//ios/chrome/browser/ui/tab_switcher:items",
    "//ios/chrome/browser/ui/tab_switcher:utils",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_item_identifier",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_toolbars_configuration_provider",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_ui",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_view_controller_mutator",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid/regular:regular_ui",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/tab_context_menu",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/toolbars",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/confirmation_alert",
    "//ios/chrome/common/ui/util",
    "//ios/web/public",
    "//ui/base",
    "//ui/strings",
  ]
}

source_set("inactive_tabs_ui") {
  sources = [
    "inactive_tabs_grid_view_controller.h",
    "inactive_tabs_grid_view_controller.mm",
    "inactive_tabs_view_controller.h",
    "inactive_tabs_view_controller.mm",
  ]
  deps = [
    ":inactive_tabs_button_ui",
    ":inactive_tabs_delegate",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/tabs/model/inactive_tabs:features",
    "//ios/chrome/browser/ui/tab_switcher",
    "//ios/chrome/browser/ui/tab_switcher:items",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid:tab_grid_ui_constants",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_item_identifier",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_ui",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_view_controller_mutator",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid/regular:regular_ui",
    "//ios/chrome/common/ui/colors",
    "//ios/web/public",
    "//ui/base",
  ]
}

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

source_set("inactive_tabs_delegate") {
  sources = [ "inactive_tabs_coordinator_delegate.h" ]
}

source_set("inactive_tabs_button") {
  sources = [
    "inactive_tabs_button_mediator.h",
    "inactive_tabs_button_mediator.mm",
  ]
  deps = [
    ":inactive_tabs_button_ui",
    "//base",
    "//components/prefs",
    "//components/prefs/ios",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/tabs/model/inactive_tabs:features",
  ]
}

source_set("inactive_tabs_button_ui") {
  sources = [
    "inactive_tabs_info_consumer.h",
    "inactive_tabs_preamble_header.h",
    "inactive_tabs_preamble_header.mm",
  ]
  deps = [
    ":inactive_tabs_button_ui_swift",
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/tabs/model/inactive_tabs:features",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_ui_constants",
    "//ios/chrome/common:string_util",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/util",
    "//ui/base",
  ]
}

swift_source_set("inactive_tabs_button_ui_swift") {
  bridge_header = "inactive_tabs_button_ui_swift_bridge.h"
  sources = [
    "inactive_tabs_button.swift",
    "inactive_tabs_button_header.swift",
  ]
  deps = [
    ":inactive_tabs_constants",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_ui_constants",
    "//ios/chrome/common/ui/colors:swift",
    "//ui/base",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "inactive_tabs_egtest.mm" ]
  deps = [
    ":inactive_tabs_constants",
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/tabs/model/inactive_tabs:features",
    "//ios/chrome/browser/ui/reading_list:eg_test_support+eg2",
    "//ios/chrome/browser/ui/settings/tabs:tabs_constants",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid:tab_grid_ui_constants",
    "//ios/chrome/browser/ui/tab_switcher/tab_grid/grid:grid_ui_constants",
    "//ios/chrome/browser/ui/tab_switcher/test:utils",
    "//ios/chrome/common/ui/confirmation_alert:constants",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:launch_configuration",
    "//net:test_support",
    "//ui/base",
  ]
  frameworks = [ "UIKit.framework" ]
}