blob: b1d019652fdaba9d950fa7d9223aac5422813636 [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("ntp") {
sources = [
"discover_feed_preview_delegate.h",
"feed_control_delegate.h",
"feed_delegate.h",
"new_tab_page_configuring.h",
"new_tab_page_content_delegate.h",
"new_tab_page_controller_delegate.h",
"new_tab_page_delegate.h",
"new_tab_page_follow_delegate.h",
"new_tab_page_omnibox_positioning.h",
]
configs += [ "//build/config/compiler:enable_arc" ]
public_deps = [
":constants",
":feature_flags",
]
deps = [ "//ios/chrome/browser/ui/util" ]
}
source_set("logo") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"logo_animation_controller.h",
"logo_vendor.h",
]
frameworks = [ "UIKit.framework" ]
}
source_set("constants") {
sources = [
"discover_feed_constants.h",
"discover_feed_constants.mm",
"new_tab_page_constants.h",
"new_tab_page_constants.mm",
"new_tab_page_header_constants.h",
"new_tab_page_header_constants.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
public_deps = [ "//ios/chrome/browser/discover_feed:constants" ]
}
source_set("coordinator") {
sources = [
"new_tab_page_coordinator.h",
"new_tab_page_coordinator.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [
":feature_flags",
":logo",
":ntp",
":ntp_internal",
"//components/feed/core/v2/public/ios:feed_ios_public",
"//components/pref_registry",
"//components/prefs",
"//components/prefs/ios",
"//components/search_engines",
"//ios/chrome/app:tests_hook",
"//ios/chrome/app/application_delegate:app_state_header",
"//ios/chrome/app/strings",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/discover_feed",
"//ios/chrome/browser/discover_feed:discover_feed_factory",
"//ios/chrome/browser/follow:browser_agent",
"//ios/chrome/browser/follow:service",
"//ios/chrome/browser/main:public",
"//ios/chrome/browser/ntp",
"//ios/chrome/browser/ntp:features",
"//ios/chrome/browser/prefs:pref_names",
"//ios/chrome/browser/reading_list",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/alert_coordinator",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/content_suggestions",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
"//ios/chrome/browser/ui/content_suggestions:feature_flags",
"//ios/chrome/browser/ui/content_suggestions:metrics",
"//ios/chrome/browser/ui/context_menu/link_preview",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/follow",
"//ios/chrome/browser/ui/main:scene_state_header",
"//ios/chrome/browser/ui/main:scene_state_observer",
"//ios/chrome/browser/ui/ntp:metrics",
"//ios/chrome/browser/ui/ntp/feed_management",
"//ios/chrome/browser/ui/ntp/feed_top_section",
"//ios/chrome/browser/ui/overscroll_actions",
"//ios/chrome/browser/ui/settings/utils",
"//ios/chrome/browser/ui/util",
"//ios/chrome/browser/url_loading",
"//ios/chrome/browser/voice",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/common/ui/util",
"//ios/public/provider/chrome/browser/ui_utils:ui_utils_api",
"//ios/web/public",
"//ui/base",
]
}
source_set("util") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"ntp_util.h",
"ntp_util.mm",
]
deps = [
"//ios/chrome/browser",
"//ios/chrome/browser/ntp",
"//ios/web/public",
]
}
source_set("ntp_internal") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"feed_header_view_controller.h",
"feed_header_view_controller.mm",
"feed_menu_commands.h",
"feed_wrapper_view_controller.h",
"feed_wrapper_view_controller.mm",
"incognito_view.h",
"incognito_view.mm",
"incognito_view_controller.h",
"incognito_view_controller.mm",
"metrics.h",
"metrics.mm",
"new_tab_page_url_loader_delegate.h",
"new_tab_page_view_controller.h",
"new_tab_page_view_controller.mm",
"notification_promo_whats_new.h",
"notification_promo_whats_new.mm",
"ntp_tile_saver.h",
"ntp_tile_saver.mm",
"revamped_incognito_view.h",
"revamped_incognito_view.mm",
]
deps = [
":logo",
":metrics",
":ntp",
"resources:fake_omnibox_bottom_gradient_color",
"resources:fake_omnibox_top_gradient_color",
"resources:incognito_icon",
"resources:ntp_background_bottom_gradient_color",
"resources:ntp_opentabs",
"resources:ntp_opentabs_clock",
"resources:ntp_opentabs_header",
"resources:ntp_opentabs_laptop",
"resources:ntp_opentabs_last_row",
"resources:ntp_opentabs_last_row_h",
"resources:ntp_opentabs_list_item",
"resources:ntp_opentabs_list_item_h",
"resources:ntp_opentabs_phone",
"resources:ntp_opentabs_recent_arrow",
"resources:ntp_opentabs_tablet",
"resources:ntp_recently_closed",
"//base",
"//base:i18n",
"//components/favicon/core",
"//components/favicon_base",
"//components/google/core/common",
"//components/history/core/browser",
"//components/keyed_service/core",
"//components/metrics",
"//components/ntp_tiles",
"//components/prefs",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/app/theme",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/discover_feed:constants",
"//ios/chrome/browser/drag_and_drop",
"//ios/chrome/browser/favicon",
"//ios/chrome/browser/history",
"//ios/chrome/browser/main:public",
"//ios/chrome/browser/metrics:metrics_internal",
"//ios/chrome/browser/ntp:features",
"//ios/chrome/browser/ntp_tiles",
"//ios/chrome/browser/reading_list",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/tabs",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/bookmarks",
"//ios/chrome/browser/ui/bubble",
"//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:feature_flags",
"//ios/chrome/browser/ui/content_suggestions/cells",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/favicon",
"//ios/chrome/browser/ui/gestures",
"//ios/chrome/browser/ui/icons:symbols",
"//ios/chrome/browser/ui/ntp/feed_top_section",
"//ios/chrome/browser/ui/overscroll_actions",
"//ios/chrome/browser/ui/settings/cells",
"//ios/chrome/browser/ui/thumb_strip:public",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/browser/ui/util",
"//ios/chrome/browser/url_loading",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/common:string_util",
"//ios/chrome/common/app_group",
"//ios/chrome/common/ntp_tile",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/elements",
"//ios/chrome/common/ui/favicon",
"//ios/chrome/common/ui/util",
"//ios/public/provider/chrome/browser/branded_images:branded_images_api",
"//ios/third_party/material_components_ios",
"//ios/web",
"//net",
"//skia",
"//ui/base",
"//ui/gfx",
"//url",
]
frameworks = [
"CoreGraphics.framework",
"QuartzCore.framework",
"UIKit.framework",
]
}
source_set("metrics") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"feed_metrics_recorder.h",
"feed_metrics_recorder.mm",
"feed_session_recorder.h",
"feed_session_recorder.mm",
]
deps = [
":ntp",
"//base",
"//components/feed/core/v2/public:common",
"//ios/chrome/browser/discover_feed:constants",
"//ios/chrome/browser/ui/content_suggestions:metrics",
]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"feed_session_recorder_unittest.mm",
"new_tab_page_coordinator_unittest.mm",
"notification_promo_whats_new_unittest.mm",
"ntp_tile_saver_unittest.mm",
]
deps = [
":coordinator",
":feature_flags",
":metrics",
":ntp",
":ntp_internal",
"//base",
"//base/test:test_support",
"//components/bookmarks/test",
"//components/metrics",
"//components/ntp_tiles",
"//components/prefs:test_support",
"//components/search_engines",
"//components/sessions",
"//components/variations",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
"//ios/chrome/browser/bookmarks",
"//ios/chrome/browser/browser_state:test_support",
"//ios/chrome/browser/favicon",
"//ios/chrome/browser/main:test_support",
"//ios/chrome/browser/ntp",
"//ios/chrome/browser/ntp_snippets:ntp_snippets",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/sessions",
"//ios/chrome/browser/sessions:test_support",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/signin:test_support",
"//ios/chrome/browser/tabs",
"//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/favicon",
"//ios/chrome/browser/ui/main:scene_state_header",
"//ios/chrome/browser/web_state_list:test_support",
"//ios/chrome/browser/web_state_list:web_state_list",
"//ios/chrome/common/app_group",
"//ios/chrome/common/ntp_tile",
"//ios/chrome/common/ui/favicon",
"//ios/chrome/test:test_support",
"//ios/web/public/test",
"//testing/gtest",
"//third_party/ocmock",
"//ui/base",
"//ui/base:test_support",
"//url",
]
}
source_set("eg2_tests") {
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [ "new_tab_page_egtest.mm" ]
deps = [
"//base/test:test_support",
"//components/policy:generated",
"//components/policy/core/common:test_support",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/browser:chrome_url_constants",
"//ios/chrome/browser/metrics:eg_test_support+eg2",
"//ios/chrome/browser/policy:eg_test_support+eg2",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//ios/chrome/browser/ui/popup_menu:constants",
"//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
"//net:test_support",
"//ui/base",
]
frameworks = [ "UIKit.framework" ]
}
source_set("feature_flags") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"new_tab_page_feature.h",
"new_tab_page_feature.mm",
]
deps = [ "//ios/chrome/browser/ui/content_suggestions:feature_flags" ]
public_deps = [ "//base" ]
}