chromium/ios/chrome/browser/ui/reading_list/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("reading_list") {
  sources = [
    "reading_list_coordinator.h",
    "reading_list_coordinator.mm",
    "reading_list_coordinator_delegate.h",
    "reading_list_list_item_custom_action_factory.h",
    "reading_list_list_item_custom_action_factory.mm",
    "reading_list_list_item_factory.h",
    "reading_list_list_item_factory.mm",
    "reading_list_list_item_factory_delegate.h",
    "reading_list_list_item_util.h",
    "reading_list_list_item_util.mm",
    "reading_list_mediator.h",
    "reading_list_mediator.mm",
    "reading_list_menu_notification_delegate.h",
    "reading_list_menu_notifier.h",
    "reading_list_menu_notifier.mm",
    "reading_list_table_view_item.h",
    "reading_list_table_view_item.mm",
    "reading_list_utils.h",
    "reading_list_utils.mm",
  ]
  deps = [
    ":reading_list_ui",
    "//base",
    "//components/favicon/core",
    "//components/feature_engagement",
    "//components/prefs",
    "//components/reading_list/core",
    "//components/reading_list/features:flags",
    "//components/reading_list/ios",
    "//components/signin/public/identity_manager/objc",
    "//components/ukm/ios:ukm_url_recorder",
    "//components/url_formatter",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/favicon/model",
    "//ios/chrome/browser/favicon/ui_bundled",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/incognito_reauth/ui_bundled:incognito_reauth_scene_agent",
    "//ios/chrome/browser/metrics/model:metrics_internal",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/policy/model:policy_util",
    "//ios/chrome/browser/reading_list/model",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/profile",
    "//ios/chrome/browser/shared/model/url:constants",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/table_view:styler",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/shared/ui/util:url_with_title",
    "//ios/chrome/browser/side_swipe/ui_bundled",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/sync/model",
    "//ios/chrome/browser/tabs/model",
    "//ios/chrome/browser/ui/authentication",
    "//ios/chrome/browser/ui/authentication:account_settings_presenter",
    "//ios/chrome/browser/ui/authentication:signin_presenter",
    "//ios/chrome/browser/ui/authentication/cells",
    "//ios/chrome/browser/ui/authentication/enterprise:enterprise_utils",
    "//ios/chrome/browser/ui/menu",
    "//ios/chrome/browser/ui/sharing",
    "//ios/chrome/browser/ui/sharing/activity_services",
    "//ios/chrome/browser/url_loading/model",
    "//ios/chrome/browser/window_activities/model",
    "//ios/chrome/common/ui/favicon",
    "//ios/chrome/common/ui/favicon:favicon_constants",
    "//ios/chrome/common/ui/table_view",
    "//ios/third_party/material_components_ios",
    "//ios/web",
    "//ios/web/common",
    "//ios/web/public",
    "//services/metrics/public/cpp:ukm_builders",
    "//ui/base",
    "//ui/strings",
    "//url",
  ]
  allow_circular_includes_from =
      [ "//ios/chrome/browser/side_swipe/ui_bundled" ]
  public_deps = [ "//ios/third_party/material_components_ios" ]
  frameworks = [ "UIKit.framework" ]
}

source_set("infobar") {
  sources = [
    "ios_add_to_reading_list_infobar_delegate.h",
    "ios_add_to_reading_list_infobar_delegate.mm",
  ]
  deps = [
    "//components/infobars/core",
    "//components/prefs",
    "//components/reading_list/core",
    "//components/ukm/ios:ukm_url_recorder",
    "//ios/chrome/browser/ui/reading_list:reading_list_constants",
    "//ios/web/public",
    "//services/metrics/public/cpp:ukm_builders",
  ]
}

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

source_set("reading_list_ui") {
  sources = [
    "number_badge_view.h",
    "number_badge_view.mm",
    "reading_list_data_sink.h",
    "reading_list_data_source.h",
    "reading_list_list_item.h",
    "reading_list_list_item_accessibility_delegate.h",
    "reading_list_list_item_updater.h",
    "reading_list_list_view_controller_audience.h",
    "reading_list_list_view_controller_delegate.h",
    "reading_list_menu_provider.h",
    "reading_list_table_view_controller.h",
    "reading_list_table_view_controller.mm",
    "reading_list_toolbar_button_commands.h",
    "reading_list_toolbar_button_manager.h",
    "reading_list_toolbar_button_manager.mm",
    "reading_list_ui_distillation_status.h",
    "text_badge_view.h",
    "text_badge_view.mm",
  ]
  deps = [
    ":reading_list_constants",
    "//base",
    "//base:i18n",
    "//components/prefs",
    "//components/prefs/ios",
    "//components/reading_list/core",
    "//components/strings",
    "//components/url_formatter",
    "//ios/chrome/app:tests_hook",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/drag_and_drop/model",
    "//ios/chrome/browser/intents:intents_donation_helper",
    "//ios/chrome/browser/keyboard/ui_bundled",
    "//ios/chrome/browser/reading_list/model",
    "//ios/chrome/browser/shared/coordinator/alert",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/list_model",
    "//ios/chrome/browser/shared/ui/table_view",
    "//ios/chrome/browser/shared/ui/table_view:utils",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/authentication/cells",
    "//ios/chrome/browser/ui/reading_list/resources",
    "//ios/chrome/browser/ui/settings/cells",
    "//ios/chrome/common",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/favicon",
    "//ui/base",
    "//ui/strings:ui_strings_grit",
    "//url",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "reading_list_list_item_factory_unittest.mm",
    "reading_list_mediator_unittest.mm",
    "reading_list_table_view_item_unittest.mm",
    "text_badge_view_unittest.mm",
  ]
  deps = [
    ":reading_list",
    ":reading_list_ui",
    "//base",
    "//base/test:test_support",
    "//components/favicon/core",
    "//components/favicon/core/test:test_support",
    "//components/feature_engagement",
    "//components/feature_engagement/test:test_support",
    "//components/prefs",
    "//components/reading_list/core",
    "//components/reading_list/core:test_support",
    "//components/sync:test_support",
    "//components/sync/base",
    "//components/url_formatter",
    "//ios/chrome/browser/favicon/model",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/reading_list/model",
    "//ios/chrome/browser/shared/ui/table_view:styler",
    "//ios/chrome/browser/shared/ui/table_view/cells",
    "//ios/chrome/browser/tabs/model",
    "//ios/chrome/browser/ui/authentication/cells",
    "//ios/chrome/test/fakes",
    "//ios/web",
    "//ios/web/public/test",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
  ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "reading_list_account_storage_egtest.mm",
    "reading_list_egtest.mm",
  ]
  deps = [
    ":eg_test_support+eg2",
    ":reading_list_constants",
    "//base",
    "//base/test:test_support",
    "//components/reading_list/features:flags",
    "//components/signin/public/base",
    "//components/sync/base",
    "//components/sync/base:features",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/reading_list/model:constants",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/elements:eg_test_support+eg2",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/table_view:constants",
    "//ios/chrome/browser/signin/model:fake_system_identity",
    "//ios/chrome/browser/ui/authentication:authentication_constants",
    "//ios/chrome/browser/ui/authentication:eg_test_support+eg2",
    "//ios/chrome/browser/ui/authentication/signin:constants",
    "//ios/chrome/browser/ui/popup_menu:constants",
    "//ios/chrome/browser/ui/settings:constants",
    "//ios/chrome/browser/ui/settings/google_services:constants",
    "//ios/chrome/common/ui/table_view:cells_constants",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:launch_configuration",
    "//ios/web/common:features",
    "//ios/web/public/navigation:navigation",
    "//net",
    "//net:test_support",
    "//ui/base",
    "//ui/base:test_support",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("eg_app_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "reading_list_app_interface.h",
    "reading_list_app_interface.mm",
  ]
  deps = [
    "//base/test:test_support",
    "//components/reading_list/core",
    "//ios/chrome/browser/reading_list/model",
    "//ios/chrome/test/app:test_support",
    "//ios/testing:nserror_support",
  ]
}

source_set("eg_test_support+eg2") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [
    "reading_list_app_interface.h",
    "reading_list_app_interface_stub.mm",
    "reading_list_egtest_utils.h",
    "reading_list_egtest_utils.mm",
  ]
  deps = [
    ":reading_list_constants",
    "//base",
    "//base/test:test_support",
    "//ios/chrome/app/strings",
    "//ios/chrome/common/ui/table_view:cells_constants",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ui/base",
  ]
}