blob: c7b822769898735a24f8cf8bd717885565ed12c6 [file] [log] [blame]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("content_suggestions") {
sources = [
"content_suggestions_alert_factory.h",
"content_suggestions_alert_factory.mm",
"content_suggestions_category_wrapper.h",
"content_suggestions_category_wrapper.mm",
"content_suggestions_coordinator.h",
"content_suggestions_coordinator.mm",
"content_suggestions_favicon_mediator.h",
"content_suggestions_favicon_mediator.mm",
"content_suggestions_header_view_controller.h",
"content_suggestions_header_view_controller.mm",
"content_suggestions_mediator.h",
"content_suggestions_mediator.mm",
"content_suggestions_metrics_recorder.h",
"content_suggestions_metrics_recorder.mm",
"content_suggestions_service_bridge_observer.h",
"content_suggestions_service_bridge_observer.mm",
"mediator_util.h",
"mediator_util.mm",
"ntp_home_mediator.h",
"ntp_home_mediator.mm",
"ntp_home_metrics.h",
"ntp_home_metrics.mm",
]
deps = [
"//base",
"//components/favicon/core",
"//components/ntp_snippets",
"//components/ntp_tiles",
"//components/reading_list/core",
"//components/reading_list/ios:ios",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/favicon",
"//ios/chrome/browser/metrics:metrics_internal",
"//ios/chrome/browser/ntp",
"//ios/chrome/browser/ntp_snippets",
"//ios/chrome/browser/ntp_tiles",
"//ios/chrome/browser/reading_list",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/tabs",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui:notifications",
"//ios/chrome/browser/ui/alert_coordinator",
"//ios/chrome/browser/ui/collection_view/cells",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui_util",
"//ios/chrome/browser/ui/content_suggestions/cells",
"//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
"//ios/chrome/browser/ui/content_suggestions/identifier",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/favicon",
"//ios/chrome/browser/ui/ntp",
"//ios/chrome/browser/ui/ntp:ntp_internal",
"//ios/chrome/browser/ui/overscroll_actions",
"//ios/chrome/browser/ui/reading_list",
"//ios/chrome/browser/ui/settings/utils:utils",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/browser/ui/util",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/common/app_group",
"//ios/chrome/common/favicon",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser/images",
"//ios/public/provider/chrome/browser/ui",
"//ios/public/provider/chrome/browser/voice",
"//ios/web",
"//ui/base",
"//ui/strings",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("content_suggestions_ui") {
sources = [
"content_suggestions_collection_controlling.h",
"content_suggestions_collection_synchronizing.h",
"content_suggestions_collection_updater.h",
"content_suggestions_collection_updater.mm",
"content_suggestions_commands.h",
"content_suggestions_data_sink.h",
"content_suggestions_data_source.h",
"content_suggestions_header_controlling.h",
"content_suggestions_header_provider.h",
"content_suggestions_header_synchronizer.h",
"content_suggestions_header_synchronizer.mm",
"content_suggestions_header_synchronizing.h",
"content_suggestions_header_view.h",
"content_suggestions_header_view.mm",
"content_suggestions_header_view_controller_delegate.h",
"content_suggestions_layout.h",
"content_suggestions_layout.mm",
"content_suggestions_metrics_recording.h",
"content_suggestions_view_controller.h",
"content_suggestions_view_controller.mm",
"content_suggestions_view_controller_audience.h",
"ntp_home_consumer.h",
]
deps = [
":content_suggestions_constant",
":content_suggestions_ui_util",
"resources:content_suggestions_no_image",
"resources:content_suggestions_offline",
"resources:ntp_search_icon",
"//base",
"//components/strings",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/collection_view",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
"//ios/chrome/browser/ui/content_suggestions/identifier",
"//ios/chrome/browser/ui/list_model",
"//ios/chrome/browser/ui/ntp",
"//ios/chrome/browser/ui/overscroll_actions",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/browser/ui/util:util",
"//ios/chrome/common/favicon",
"//ios/web/public",
"//ui/base",
]
public_deps = [
"//ios/third_party/material_components_ios",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("content_suggestions_constant") {
sources = [
"ntp_home_constant.h",
"ntp_home_constant.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [
"//ios/chrome/browser/ui/util",
]
}
source_set("content_suggestions_ui_util") {
sources = [
"content_suggestions_collection_utils.h",
"content_suggestions_collection_utils.mm",
]
deps = [
":content_suggestions_constant",
"//base",
"//base:i18n",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
"//ios/chrome/browser/ui/location_bar:constants",
"//ios/chrome/browser/ui/ntp",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/third_party/material_components_ios",
"//ios/web/public",
"//ui/base",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"content_suggestions_category_wrapper_unittest.mm",
"content_suggestions_collection_updater_unittest.mm",
"content_suggestions_collection_utils_unittest.mm",
"content_suggestions_header_synchronizer_unittest.mm",
"ntp_home_mediator_unittest.mm",
]
deps = [
":content_suggestions",
":content_suggestions_ui",
":content_suggestions_ui_util",
"//base",
"//components/ntp_snippets",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state:test_support",
"//ios/chrome/browser/ntp_snippets",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui:notifications",
"//ios/chrome/browser/ui/collection_view",
"//ios/chrome/browser/ui/collection_view",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
"//ios/chrome/browser/ui/content_suggestions/cells",
"//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
"//ios/chrome/browser/ui/content_suggestions/identifier",
"//ios/chrome/browser/ui/toolbar/test",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/browser/web_state_list:test_support",
"//ios/chrome/test/base",
"//ios/public/provider/chrome/browser/ui",
"//ios/web/public/test",
"//ios/web/public/test/fakes",
"//testing/gtest",
"//testing/gtest",
"//third_party/ocmock",
"//third_party/ocmock",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("eg_tests") {
testonly = true
sources = [
"content_suggestions_egtest.mm",
"ntp_home_egtest.mm",
"ntp_home_provider_test_singleton.h",
"ntp_home_provider_test_singleton.mm",
"ntp_home_test_utils.h",
"ntp_home_test_utils.mm",
]
deps = [
":content_suggestions_constant",
":content_suggestions_ui",
":content_suggestions_ui_util",
"//base",
"//base/test:test_support",
"//components/keyed_service/ios",
"//components/ntp_snippets",
"//components/ntp_snippets:test_support",
"//components/reading_list/core",
"//components/search_engines",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/ntp_snippets",
"//ios/chrome/browser/reading_list",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/content_suggestions/cells:cells_ui",
"//ios/chrome/browser/ui/location_bar:location_bar",
"//ios/chrome/browser/ui/ntp:ntp_controller",
"//ios/chrome/browser/ui/settings",
"//ios/chrome/browser/ui/tab_grid:egtest_support",
"//ios/chrome/browser/ui/toolbar/buttons:buttons",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/test/app:test_support",
"//ios/chrome/test/base:base",
"//ios/chrome/test/earl_grey:test_support",
"//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/earl_grey:earl_grey+link",
"//ios/web/public/test/http_server",
"//testing/gmock",
"//ui/strings",
]
libs = [
"UIKit.framework",
"XCTest.framework",
]
configs += [ "//build/config/compiler:enable_arc" ]
}