blob: c4988645a22f0d7987086b793bd95d5d827de4d1 [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 = [
"new_tab_page_commands.h",
"new_tab_page_content_delegate.h",
"new_tab_page_controller_delegate.h",
"new_tab_page_header_constants.h",
"new_tab_page_header_constants.mm",
"new_tab_page_omnibox_positioning.h",
]
configs += [ "//build/config/compiler:enable_arc" ]
public_deps = [ ":feature_flags" ]
deps = [ "//ios/chrome/browser/ui/util" ]
}
source_set("coordinator") {
sources = [
"new_tab_page_coordinator.h",
"new_tab_page_coordinator.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [
":feature_flags",
":ntp",
":ntp_internal",
"//components/feed/core/shared_prefs:feed_shared_prefs",
"//components/pref_registry",
"//components/prefs",
"//components/prefs/ios",
"//components/search_engines",
"//ios/chrome/app:tests_hook",
"//ios/chrome/browser:pref_names",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/main:public",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/content_suggestions",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/main:scene_state_header",
"//ios/chrome/browser/ui/main:scene_state_observer",
"//ios/chrome/browser/ui/overscroll_actions",
"//ios/chrome/browser/ui/settings/utils",
"//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",
"//ios/public/provider/chrome/browser/discover_feed",
"//ios/public/provider/chrome/browser/voice",
"//ios/web/public",
]
}
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 = [
"discover_feed_wrapper_view_controller.h",
"discover_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_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",
]
deps = [
":ntp",
"resources:incognito_icon",
"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/strings",
"//components/suggestions",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/drag_and_drop",
"//ios/chrome/browser/favicon",
"//ios/chrome/browser/history",
"//ios/chrome/browser/metrics:metrics_internal",
"//ios/chrome/browser/ntp_tiles",
"//ios/chrome/browser/reading_list",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/suggestions",
"//ios/chrome/browser/tabs",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/bookmarks",
"//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/cells",
"//ios/chrome/browser/ui/favicon",
"//ios/chrome/browser/ui/gestures",
"//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",
"//ios/chrome/common/app_group",
"//ios/chrome/common/ntp_tile",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/favicon",
"//ios/chrome/common/ui/util",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser/images",
"//ios/public/provider/chrome/browser/ui",
"//ios/public/provider/chrome/browser/voice",
"//ios/third_party/material_components_ios",
"//ios/web",
"//net",
"//skia",
"//ui/base",
"//ui/gfx",
"//url",
]
frameworks = [
"CoreGraphics.framework",
"QuartzCore.framework",
"UIKit.framework",
]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"new_tab_page_coordinator_unittest.mm",
"notification_promo_whats_new_unittest.mm",
"ntp_tile_saver_unittest.mm",
]
deps = [
":coordinator",
":feature_flags",
":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_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/public/provider/chrome/browser/images",
"//ios/web/public/test",
"//testing/gtest",
"//third_party/ocmock",
"//ui/base",
"//ui/base:test_support",
"//url",
]
}
source_set("eg2_tests") {
defines = [ "CHROME_EARL_GREY_2" ]
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/strings",
"//ios/chrome/app/strings",
"//ios/chrome/browser/metrics:eg_test_support+eg2",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//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("perf_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [ "new_tab_page_perftest.mm" ]
deps = [
"//base/test:test_support",
"//ios/chrome/browser/main",
"//ios/chrome/browser/sessions",
"//ios/chrome/browser/test:perf_test_support",
"//ios/chrome/browser/ui/browser_view",
"//ios/chrome/browser/ui/commands",
]
}
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" ]
}