chromium/chrome/android/features/tab_ui/BUILD.gn

# Copyright 2019 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/android/rules.gni")
import("//build/config/locales.gni")
import("//chrome/android/features/android_library_factory_tmpl.gni")
import("//chrome/common/features.gni")
import("//tools/grit/grit_rule.gni")

java_strings_grd("java_strings_grd") {
  defines = chrome_grit_defines
  grd_file = "java/strings/android_chrome_tab_ui_strings.grd"
  outputs =
      [ "values/android_chrome_tab_ui_strings.xml" ] +
      process_file_template(
          android_bundle_locales_as_resources,
          [ "values-{{source_name_part}}/android_chrome_tab_ui_strings.xml" ])
}

android_resources("java_resources") {
  sources = [
    "java/res/anim/iph_hovered_card_animation.xml",
    "java/res/anim/iph_selected_card_animation.xml",
    "java/res/anim/iph_selected_card_color_change_animation.xml",
    "java/res/anim/iph_touch_point_alpha_animation.xml",
    "java/res/anim/iph_touch_point_animation.xml",
    "java/res/anim/iph_touch_point_background_alpha_animation.xml",
    "java/res/anim/iph_touch_point_background_animation.xml",
    "java/res/drawable/archived_tab_icon.xml",
    "java/res/drawable/chevron_right.xml",
    "java/res/drawable/color_picker_color_icon.xml",
    "java/res/drawable/ic_check_googblue_20dp_animated.xml",
    "java/res/drawable/ic_close_tabs_24dp.xml",
    "java/res/drawable/ic_deselect_all_24dp.xml",
    "java/res/drawable/ic_group_add_16dp.xml",
    "java/res/drawable/ic_open_new_tab_in_group_24dp.xml",
    "java/res/drawable/ic_price_alert_blue.xml",
    "java/res/drawable/ic_rating_star_full.xml",
    "java/res/drawable/ic_rating_star_half.xml",
    "java/res/drawable/ic_rating_star_outline.xml",
    "java/res/drawable/ic_select_all_24dp.xml",
    "java/res/drawable/ic_ungroup_tabs_24dp.xml",
    "java/res/drawable/iph_drag_and_drop_drawable.xml",
    "java/res/drawable/phone_tab_switcher_empty_state_illustration.xml",
    "java/res/drawable/price_card_background.xml",
    "java/res/drawable/price_card_scrim.xml",
    "java/res/drawable/selected_tab_background.xml",
    "java/res/drawable/selected_tab_background_incognito.xml",
    "java/res/drawable/tab_grid_card_background.xml",
    "java/res/drawable/tab_grid_dialog_background.xml",
    "java/res/drawable/tab_grid_selection_list_icon.xml",
    "java/res/drawable/tab_group_color_icon.xml",
    "java/res/drawable/tab_group_dialog_color_icon.xml",
    "java/res/drawable/tab_group_favicon_quarter_bg.xml",
    "java/res/drawable/tab_group_list_empty_state_illustration.xml",
    "java/res/drawable/tab_group_share_icon.xml",
    "java/res/drawable/tab_group_share_with_color_icon.xml",
    "java/res/drawable/tab_group_start_icon_bg.xml",
    "java/res/drawable/tab_hover_card_background.xml",
    "java/res/drawable/tab_label_background.xml",
    "java/res/drawable/tab_label_icon_background.xml",
    "java/res/drawable/tab_list_editor_share_icon.xml",
    "java/res/drawable/tab_strip_fading_edge_end.xml",
    "java/res/drawable/tab_strip_fading_edge_start.xml",
    "java/res/drawable/tab_strip_item_notification_bubble.xml",
    "java/res/drawable/tab_strip_selected_ring.xml",
    "java/res/drawable/tab_strip_selected_ring_incognito.xml",
    "java/res/drawable/tablet_tab_switcher_empty_state_illustration.xml",
    "java/res/drawable/ungroup_bar_background.xml",
    "java/res/layout/action_confirmation_dialog.xml",
    "java/res/layout/archived_tabs_dialog.xml",
    "java/res/layout/archived_tabs_message_card_view.xml",
    "java/res/layout/bottom_tab_strip_toolbar.xml",
    "java/res/layout/color_picker_item.xml",
    "java/res/layout/custom_message_card_item.xml",
    "java/res/layout/dynamic_bottom_tab_strip_toolbar.xml",
    "java/res/layout/large_message_card_item.xml",
    "java/res/layout/price_card.xml",
    "java/res/layout/strip_tab_drag_shadow_view.xml",
    "java/res/layout/tab_card_label_layout.xml",
    "java/res/layout/tab_grid_card_item.xml",
    "java/res/layout/tab_grid_card_item_layout.xml",
    "java/res/layout/tab_grid_dialog_layout.xml",
    "java/res/layout/tab_grid_dialog_toolbar.xml",
    "java/res/layout/tab_grid_dialog_toolbar_two_row.xml",
    "java/res/layout/tab_grid_message_card_item.xml",
    "java/res/layout/tab_group_color_picker_container.xml",
    "java/res/layout/tab_group_favicon_cluster.xml",
    "java/res/layout/tab_group_favicon_quarter.xml",
    "java/res/layout/tab_group_list.xml",
    "java/res/layout/tab_group_row.xml",
    "java/res/layout/tab_group_visual_data_dialog.xml",
    "java/res/layout/tab_group_visual_data_text_input_layout.xml",
    "java/res/layout/tab_hover_card_holder.xml",
    "java/res/layout/tab_list_card_item.xml",
    "java/res/layout/tab_list_card_item.xml",
    "java/res/layout/tab_list_editor_action_view.xml",
    "java/res/layout/tab_list_editor_layout.xml",
    "java/res/layout/tab_list_editor_toolbar.xml",
    "java/res/layout/tab_list_recycler_view_layout.xml",
    "java/res/layout/tab_strip_item.xml",
    "java/res/layout/toolbar_back_button.xml",
    "java/res/layout/toolbar_new_tab_and_menu_button.xml",
    "java/res/values-night/colors.xml",
    "java/res/values-night/dimens.xml",
    "java/res/values/attrs.xml",
    "java/res/values/colors.xml",
    "java/res/values/dimens.xml",
    "java/res/values/ids.xml",
    "java/res/values/styles.xml",
    "java/res/xml/tab_archive_settings.xml",
    "java/res/xml/tab_archive_time_delta_preference.xml",
    "java/res/xml/tabs_settings.xml",
  ]
  deps = [
    ":java_strings_grd",
    "//chrome/android:chrome_app_java_resources",
    "//chrome/browser/data_sharing:java_resources",
  ]
}

android_library("unit_device_javatests") {
  testonly = true
  resources_package = "org.chromium.chrome.tab_ui"
  sources = [
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/LargeMessageCardViewBinderTest.java",
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardProviderTest.java",
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardViewBinderTest.java",
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/PriceCardViewTest.java",
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewBinderTest.java",
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewTest.java",
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiViewBinderTest.java",
    "javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java",
  ]

  deps = [
    ":java_resources",
    ":test_support_javalib",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base/test:test_support_java",
    "//chrome/android:chrome_java",
    "//chrome/browser/browser_controls/android:java",
    "//chrome/browser/commerce/price_tracking/android:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/hub:factory_java",
    "//chrome/browser/hub:java",
    "//chrome/browser/optimization_guide/android:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tab_ui/android:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/ui/android/theme:java",
    "//chrome/test/android:chrome_java_test_support_common",
    "//components/browser_ui/styles/android:java",
    "//components/browser_ui/styles/android:java_resources",
    "//components/browser_ui/widget/android:java",
    "//components/commerce/core:proto_java",
    "//components/embedder_support/android:util_java",
    "//components/optimization_guide/proto:optimization_guide_proto_java",
    "//components/payments/content/android:full_java",
    "//components/tab_groups:tab_groups_java",
    "//content/public/android:content_full_java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/android_deps:espresso_java",
    "//third_party/android_deps:material_design_java",
    "//third_party/android_deps:protobuf_lite_runtime_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_appcompat_appcompat_java",
    "//third_party/androidx:androidx_appcompat_appcompat_resources_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/androidx:androidx_test_rules_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/hamcrest:hamcrest_core_java",
    "//third_party/hamcrest:hamcrest_library_java",
    "//third_party/jni_zero:jni_zero_java",
    "//third_party/junit:junit",
    "//third_party/mockito:mockito_java",
    "//ui/android:ui_java_test_support",
    "//ui/android:ui_java_test_support",
    "//ui/android:ui_no_recycler_view_java",
    "//ui/android:ui_recycler_view_java",
    "//ui/android:ui_utils_java",
    "//url:gurl_java",
  ]
}

android_library("test_support_javalib") {
  testonly = true
  resources_package = "org.chromium.chrome.tab_ui"
  sources = [ "javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabUiTestHelper.java" ]

  deps = [
    ":java_resources",
    "//base:base_java",
    "//base:base_java_test_support",
    "//chrome/android:chrome_java",
    "//chrome/browser/flags:java",
    "//chrome/browser/hub:java",
    "//chrome/browser/hub/internal:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tab_group:java",
    "//chrome/browser/tab_ui/android:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/ui/android/layouts:java",
    "//chrome/browser/ui/android/layouts/test:java",
    "//chrome/test/android:chrome_java_integration_test_support",
    "//components/browser_ui/widget/android:test_support_java",
    "//content/public/android:content_full_java",
    "//content/public/android:content_main_dex_java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/android_deps:espresso_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/hamcrest:hamcrest_library_java",
    "//third_party/junit:junit",
    "//ui/android:ui_no_recycler_view_java",
  ]
}