# Copyright 2024 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//components/compose/features.gni") static_library("home_modules") { sources = [ "card_selection_info.cc", "card_selection_info.h", "card_selection_signals.cc", "card_selection_signals.h", "ephemeral_home_module_backend.cc", "ephemeral_home_module_backend.h", "ephemeral_module_utils.cc", "ephemeral_module_utils.h", "home_modules_card_registry.cc", "home_modules_card_registry.h", "price_tracking_notification_promo.cc", "price_tracking_notification_promo.h", "rank_fetcher_helper.cc", "rank_fetcher_helper.h", "send_tab_notification_promo.cc", "send_tab_notification_promo.h", ] if (is_ios) { sources += [ "address_bar_position_ephemeral_module.cc", "address_bar_position_ephemeral_module.h", "app_bundle_promo_ephemeral_module.cc", "app_bundle_promo_ephemeral_module.h", "autofill_passwords_ephemeral_module.cc", "autofill_passwords_ephemeral_module.h", "default_browser_promo_ephemeral_module.cc", "default_browser_promo_ephemeral_module.h", "enhanced_safe_browsing_ephemeral_module.cc", "enhanced_safe_browsing_ephemeral_module.h", "home_modules_card_registry_ios.cc", "home_modules_card_registry_ios.h", "lens_ephemeral_module.cc", "lens_ephemeral_module.h", "save_passwords_ephemeral_module.cc", "save_passwords_ephemeral_module.h", ] } if (is_android) { sources += [ "auxiliary_search_promo.cc", "auxiliary_search_promo.h", "default_browser_promo.cc", "default_browser_promo.h", "history_sync_promo.cc", "history_sync_promo.h", "home_modules_card_registry_android.cc", "home_modules_card_registry_android.h", "ntp_theme_promo.cc", "ntp_theme_promo.h", "quick_delete_promo.cc", "quick_delete_promo.h", "tab_group_promo.cc", "tab_group_promo.h", "tab_group_sync_promo.cc", "tab_group_sync_promo.h", ] } deps = [ ":constants", "//base", "//components/commerce/core:feature_list", "//components/prefs", "//components/segmentation_platform/embedder/home_modules/tips_manager:constants", "//components/segmentation_platform/embedder/home_modules/tips_manager:signal_constants", "//components/segmentation_platform/internal", "//components/segmentation_platform/public", "//components/send_tab_to_self", "//components/signin/public/base:signin_switches", ] } source_set("constants") { sources = [ "constants.cc", "constants.h", ] public_deps = [ "//base" ] deps = [ "//components/segmentation_platform/embedder/home_modules/tips_manager:constants" ] } source_set("unit_tests") { testonly = true sources = [ "card_selection_signals_unittest.cc", "ephemeral_home_module_backend_unittest.cc", "price_tracking_notification_promo_unittest.cc", "rank_fetcher_helper_unittest.cc", "send_tab_notification_promo_unittest.cc", "test_home_modules_card_registry.cc", "test_home_modules_card_registry.h", "test_utils.cc", "test_utils.h", ] if (is_ios) { sources += [ "address_bar_position_ephemeral_module_unittest.cc", "app_bundle_promo_ephemeral_module_unittest.cc", "autofill_passwords_ephemeral_module_unittest.cc", "default_browser_promo_ephemeral_module_unittest.cc", "enhanced_safe_browsing_ephemeral_module_unittest.cc", "home_modules_card_registry_ios_unittest.cc", "lens_ephemeral_module_unittest.cc", "save_passwords_ephemeral_module_unittest.cc", ] } if (is_android) { sources += [ "auxiliary_search_promo_unittest.cc", "default_browser_promo_unittest.cc", "history_sync_promo_unittest.cc", "home_modules_card_registry_android_unittest.cc", "ntp_theme_promo_unittest.cc", "quick_delete_promo_unittest.cc", "tab_group_promo_unittest.cc", "tab_group_sync_promo_unittest.cc", ] } deps = [ ":constants", ":home_modules", "//base", "//base/test:test_support", "//components/commerce/core:feature_list", "//components/prefs", "//components/prefs:test_support", "//components/segmentation_platform/embedder/default_model:default_model_test_base", "//components/segmentation_platform/embedder/home_modules/tips_manager:constants", "//components/segmentation_platform/embedder/home_modules/tips_manager:signal_constants", "//components/segmentation_platform/internal", "//components/segmentation_platform/public", "//components/segmentation_platform/public:test_support", "//components/send_tab_to_self", "//components/signin/public/base:signin_switches", "//testing/gmock", "//testing/gtest", ] }