chromium/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn

# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//ios/build/chrome_build.gni")

source_set("public") {
  sources = [
    "shortcuts_commands.h",
    "shortcuts_consumer.h",
    "shortcuts_consumer_source.h",
  ]
  deps = []
  frameworks = [ "UIKit.framework" ]
}

source_set("cells") {
  sources = [
    "content_suggestions_most_visited_constants.h",
    "content_suggestions_most_visited_constants.mm",
    "content_suggestions_most_visited_item.h",
    "content_suggestions_most_visited_item.mm",
    "content_suggestions_most_visited_tile_view.h",
    "content_suggestions_most_visited_tile_view.mm",
    "content_suggestions_tile_view.h",
    "content_suggestions_tile_view.mm",
    "most_visited_tiles_commands.h",
    "multi_row_container_view.h",
    "multi_row_container_view.mm",
  ]
  deps = [
    ":constants",
    "//base",
    "//components/ntp_tiles",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/ntp/ui_bundled:constants",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/content_suggestions:constants",
    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
    "//ios/chrome/browser/ui/content_suggestions:public",
    "//ios/chrome/browser/ui/content_suggestions/cells/resources",
    "//ios/chrome/common:timing",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/favicon",
    "//ios/chrome/common/ui/table_view:cells_constants",
    "//ios/chrome/common/ui/util",
    "//ios/chrome/common/ui/util:dynamic_type_util",
    "//ios/public/provider/chrome/browser/raccoon:raccoon_api",
    "//ui/base",
    "//url",
  ]
  frameworks = [ "UIKit.framework" ]
}

source_set("most_visited_tiles") {
  sources = [
    "content_suggestions_tile_saver.h",
    "content_suggestions_tile_saver.mm",
    "most_visited_tiles_config.h",
    "most_visited_tiles_config.mm",
    "most_visited_tiles_mediator.h",
    "most_visited_tiles_mediator.mm",
    "most_visited_tiles_stack_view.h",
    "most_visited_tiles_stack_view.mm",
    "most_visited_tiles_stack_view_consumer.h",
    "most_visited_tiles_stack_view_consumer_source.h",
  ]
  deps = [
    ":cells",
    ":constants",
    "//components/favicon/core",
    "//components/ntp_tiles",
    "//components/strings",
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/favicon/ui_bundled",
    "//ios/chrome/browser/net/model:crurl",
    "//ios/chrome/browser/ntp/ui_bundled",
    "//ios/chrome/browser/ntp_tiles/model",
    "//ios/chrome/browser/policy/model:policy_util",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/shared/ui/util:snackbar_util",
    "//ios/chrome/browser/ui/content_suggestions:constants",
    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui_util",
    "//ios/chrome/browser/ui/content_suggestions:metrics",
    "//ios/chrome/browser/ui/content_suggestions:public",
    "//ios/chrome/browser/ui/content_suggestions/magic_stack:public",
    "//ios/chrome/browser/ui/menu",
    "//ios/chrome/browser/url_loading/model",
    "//ios/chrome/browser/url_loading/model:url_loading_params_header",
    "//ios/chrome/browser/widget_kit/model:features",
    "//ios/chrome/common/app_group",
    "//ios/chrome/common/ntp_tile",
    "//ios/chrome/common/ui/favicon",
    "//ui/base",
  ]
  public_deps = [ "//ios/third_party/material_components_ios" ]
  if (ios_enable_widget_kit_extension) {
    deps += [ "//ios/chrome/browser/widget_kit/model:model_swift" ]
  }
}

source_set("shortcuts") {
  sources = [
    "content_suggestions_most_visited_action_item.h",
    "content_suggestions_most_visited_action_item.mm",
    "content_suggestions_shortcut_tile_view.h",
    "content_suggestions_shortcut_tile_view.mm",
    "shortcuts_config.h",
    "shortcuts_config.mm",
    "shortcuts_mediator.h",
    "shortcuts_mediator.mm",
  ]
  deps = [
    ":cells",
    ":constants",
    ":public",
    "//components/feature_engagement/public",
    "//components/reading_list/core",
    "//components/reading_list/ios",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/ntp/ui_bundled",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/ui/content_suggestions:constants",
    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui_util",
    "//ios/chrome/browser/ui/content_suggestions:metrics",
    "//ios/chrome/browser/ui/content_suggestions:public",
    "//ios/chrome/browser/ui/content_suggestions/magic_stack:public",
    "//ios/chrome/browser/ui/whats_new:util",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/util",
    "//ios/chrome/common/ui/util:dynamic_type_util",
  ]
}

source_set("constants") {
  sources = [
    "content_suggestions_cells_constants.h",
    "content_suggestions_cells_constants.mm",
    "content_suggestions_tile_constants.h",
    "content_suggestions_tile_constants.mm",
    "content_suggestions_tile_layout_util.h",
    "content_suggestions_tile_layout_util.mm",
  ]

  deps = [
    "//ios/chrome/app/strings",
    "//ios/chrome/browser/shared/ui/symbols",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/common/ui/util",
    "//ui/base:base",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "content_suggestions_tile_layout_util_unittest.mm",
    "content_suggestions_tile_saver_unittest.mm",
    "most_visited_tiles_mediator_unittest.mm",
    "shortcuts_mediator_unittest.mm",
  ]
  deps = [
    ":cells",
    ":constants",
    ":most_visited_tiles",
    ":shortcuts",
    "//base",
    "//base/test:test_support",
    "//components/feature_engagement/test:test_support",
    "//components/ntp_tiles",
    "//components/reading_list/core",
    "//components/sync_preferences:test_support",
    "//ios/chrome/browser/favicon/model",
    "//ios/chrome/browser/favicon/ui_bundled",
    "//ios/chrome/browser/feature_engagement/model",
    "//ios/chrome/browser/ntp/ui_bundled",
    "//ios/chrome/browser/reading_list/model",
    "//ios/chrome/browser/reading_list/model:test_support",
    "//ios/chrome/browser/shared/model/application_context",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/public/commands",
    "//ios/chrome/browser/signin/model",
    "//ios/chrome/browser/signin/model:test_support",
    "//ios/chrome/browser/ui/content_suggestions:constants",
    "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui_util",
    "//ios/chrome/browser/ui/content_suggestions:metrics",
    "//ios/chrome/browser/url_loading/model",
    "//ios/chrome/browser/url_loading/model:test_support",
    "//ios/chrome/common/app_group",
    "//ios/chrome/common/ntp_tile",
    "//ios/chrome/common/ui/favicon",
    "//ios/chrome/test:block_cleanup_test",
    "//ios/chrome/test:test_support",
    "//ios/web/public/test",
    "//net",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
    "//ui/base:test_support",
    "//url",
  ]
}