chromium/ios/chrome/browser/shared/ui/elements/BUILD.gn

# Copyright 2016 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("elements") {
  sources = [
    "branded_navigation_item_title_view.h",
    "branded_navigation_item_title_view.mm",
    "crossfade_label.h",
    "crossfade_label.mm",
    "custom_highlight_button.h",
    "custom_highlight_button.mm",
    "extended_touch_target_button.h",
    "extended_touch_target_button.mm",
    "fade_truncating_label+Testing.h",
    "fade_truncating_label.h",
    "fade_truncating_label.mm",
    "gray_highlight_button.h",
    "gray_highlight_button.mm",
    "home_waiting_view.h",
    "home_waiting_view.mm",
    "instruction_view.h",
    "instruction_view.mm",
    "new_feature_badge_view.h",
    "new_feature_badge_view.mm",
    "self_sizing_table_view.h",
    "self_sizing_table_view.mm",
    "text_field_configuration.h",
    "text_field_configuration.mm",
    "top_aligned_image_view.h",
    "top_aligned_image_view.mm",
    "windowed_container_view.h",
    "windowed_container_view.mm",
  ]
  deps = [
    "//base",
    "//base:i18n",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/elements:constants",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/omnibox:features",
    "//ios/chrome/common:string_util",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/util",
    "//ios/chrome/common/ui/util:dynamic_type_util",
    "//ios/public/provider/chrome/browser/font:font_api",
    "//ios/third_party/material_components_ios",
    "//ui/base",
  ]
}

source_set("activity_overlay") {
  sources = [
    "activity_overlay_coordinator.h",
    "activity_overlay_coordinator.mm",
  ]
  deps = [
    ":elements_internal",
    "//base",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/common/ui/util",
  ]
}

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

source_set("unit_tests") {
  testonly = true
  sources = [
    "activity_overlay_coordinator_unittest.mm",
    "chrome_activity_overlay_coordinator_unittest.mm",
    "crossfade_label_unittest.mm",
    "fade_truncating_label_unittest.mm",
    "text_field_configuration_unittest.mm",
    "windowed_container_view_unittest.mm",
  ]
  deps = [
    ":activity_overlay",
    ":elements",
    ":elements_internal",
    "//base",
    "//base/test:test_support",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/test:test_support",
    "//testing/gtest",
    "//third_party/ocmock",
  ]
}

source_set("elements_internal") {
  sources = [
    "activity_overlay_view.h",
    "activity_overlay_view.mm",
    "activity_overlay_view_controller.h",
    "activity_overlay_view_controller.mm",
    "chrome_activity_overlay_coordinator.h",
    "chrome_activity_overlay_coordinator.mm",
    "chrome_activity_overlay_view_controller.h",
    "chrome_activity_overlay_view_controller.mm",
  ]
  deps = [
    ":constants",
    "//base",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/scoped_ui_blocker:scoped_ui_blocker",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/util",
    "//ios/third_party/material_components_ios",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("eg_test_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "activity_overlay_egtest_util.h",
    "activity_overlay_egtest_util.mm",
  ]
  deps = [
    "//base/test:test_support",
    "//ios/chrome/browser/shared/ui/elements:constants",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ui/base",
  ]
}