chromium/ios/chrome/browser/ui/tab_switcher/tab_strip/ui/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")

swift_source_set("swift") {
  bridge_header = "tab_strip_ui_swift_bridge.h"
  sources = [
    "tab_strip_consumer.swift",
    "tab_strip_decoration_view.swift",
    "tab_strip_item_data.swift",
    "tab_strip_item_identifier.swift",
    "tab_strip_layout.swift",
    "tab_strip_new_tab_button.swift",
    "tab_strip_new_tab_button_delegate.swift",
    "tab_strip_view_controller.swift",
  ]
  deps = [
    ":swift_constants",
    ":ui",
    ":utils",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/metrics:metrics_bridge",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/shared/ui/util:util_swift",
    "//ios/chrome/browser/ui/menu",
    "//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_strip/ui/context_menu",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/elements",
    "//ui/base",
  ]
}

source_set("ui") {
  sources = [
    "tab_strip_cell.h",
    "tab_strip_cell.mm",
    "tab_strip_group_cell.h",
    "tab_strip_group_cell.mm",
    "tab_strip_group_stroke_view.h",
    "tab_strip_group_stroke_view.mm",
    "tab_strip_mutator.h",
    "tab_strip_tab_cell.h",
    "tab_strip_tab_cell.mm",
  ]
  deps = [
    ":swift_constants_for_objective_c",
    ":utils",
    "//base",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/ui/elements",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/shared/ui/util/image",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/elements",
    "//ios/chrome/common/ui/util",
    "//ios/public/provider/chrome/browser/raccoon:raccoon_api",
    "//ios/third_party/material_components_ios",
    "//ui/base",
  ]
}

source_set("utils") {
  sources = [
    "tab_strip_features_utils.h",
    "tab_strip_features_utils.mm",
    "tab_strip_utils.h",
    "tab_strip_utils.mm",
  ]
  deps = [
    "//base",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/public/features:features_utils",
    "//ios/chrome/common/ui/colors",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "tab_strip_item_identifier_unittest.mm" ]
  deps = [
    ":swift",
    "//components/tab_groups",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/model/web_state_list/test:test_support",
    "//ios/chrome/browser/ui/tab_switcher",
    "//ios/chrome/browser/ui/tab_switcher:items",
    "//ios/web/public:public",
    "//ios/web/public/test/fakes",
    "//testing/gtest",
  ]
}

swift_source_set("swift_constants") {
  sources = [ "tab_strip_constants.swift" ]
}

swift_source_set("swift_constants_for_objective_c") {
  sources = [ "tab_strip_constants_for_objective_c.swift" ]
  deps = [ ":swift_constants" ]
}