# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//third_party/jni_zero/jni_zero.gni")
android_library("java") {
srcjar_deps = [ ":jni_headers" ]
sources = [
"java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarProperties.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarView.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinder.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetContent.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinator.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediator.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageContext.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageScheduler.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageViewModel.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMetrics.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsCoordinator.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsDataProvider.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsEvent.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsEventStorage.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsMediator.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsStorageFactory.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantViewerConfig.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/PageInfoStoreInfoController.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/RatingStarSpan.java",
]
deps = [
"//base:base_java",
"//base/version_info/android:version_constants_java",
"//build/android:build_java",
"//chrome/android:base_module_java",
"//chrome/android/features/tab_ui:java_resources",
"//chrome/android/features/tab_ui:java_strings_grd",
"//chrome/browser/android/content:java",
"//chrome/browser/android/lifecycle:java",
"//chrome/browser/commerce/android:java",
"//chrome/browser/feature_engagement:java",
"//chrome/browser/flags:java",
"//chrome/browser/optimization_guide/android:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/ui/android/favicon:java",
"//components/browser_ui/bottomsheet/android:java",
"//components/browser_ui/widget/android:java",
"//components/commerce/core/android:core_java",
"//components/embedder_support/android:content_view_java",
"//components/embedder_support/android:util_java",
"//components/embedder_support/android:web_contents_delegate_java",
"//components/feature_engagement/public:public_java",
"//components/messages/android:java",
"//components/optimization_guide/proto:optimization_guide_proto_java",
"//components/page_info/android:java",
"//components/page_info/android:page_info_action_enum_java",
"//components/prefs/android:java",
"//components/security_state/content/android:java",
"//components/security_state/core:security_state_enums_java",
"//components/site_engagement/content/android:java",
"//components/thin_webview:factory_java",
"//components/thin_webview:java",
"//components/ukm/android:java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//content/public/android:content_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_no_recycler_view_java",
"//ui/android:ui_utils_java",
"//url:gurl_java",
]
resources_package = "org.chromium.chrome.tab_ui"
}
robolectric_library("junit") {
sources = [
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediatorTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageContextTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageSchedulerTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMetricsTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsCallbackHelper.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsCoordinatorTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsDataProviderTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsMediatorTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsStorageFactoryTest.java",
]
deps = [
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//chrome/android:base_module_java",
"//chrome/android/features/tab_ui:java_resources",
"//chrome/android/features/tab_ui:java_strings_grd",
"//chrome/browser/android/lifecycle:java",
"//chrome/browser/commerce/android:java",
"//chrome/browser/commerce/merchant_viewer/android:java",
"//chrome/browser/feature_engagement:java",
"//chrome/browser/flags:java",
"//chrome/browser/optimization_guide/android:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/ui/android/favicon:java",
"//chrome/test/android:chrome_java_unit_test_support",
"//components/browser_ui/bottomsheet/android:java",
"//components/commerce/core/android:core_java",
"//components/embedder_support/android:content_view_java",
"//components/embedder_support/android:util_java",
"//components/embedder_support/android:web_contents_delegate_java",
"//components/feature_engagement/public:public_java",
"//components/messages/android:java",
"//components/optimization_guide/proto:optimization_guide_proto_java",
"//components/page_info/android:java",
"//components/prefs/android:java",
"//components/security_state/content/android:java",
"//components/security_state/core:security_state_enums_java",
"//components/thin_webview:java",
"//components/user_prefs/android:java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:espresso_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/hamcrest:hamcrest_core_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_no_recycler_view_java",
"//url:gurl_java",
"//url:gurl_junit_test_support",
]
resources_package = "org.chromium.chrome.tab_ui"
}
android_library("javatests") {
testonly = true
resources_package = "org.chromium.chrome.tab_ui"
sources = [
"javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinatorTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageViewTest.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsEventLoadCallbackHelper.java",
"javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsEventStorageTest.java",
]
deps = [
"//base:base_java",
"//base:base_java_test_support",
"//chrome/browser/commerce/merchant_viewer/android:java",
"//chrome/browser/creator/android:creator_java_resources",
"//chrome/browser/flags:java",
"//chrome/browser/optimization_guide/android:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/ui/android/page_info:java",
"//chrome/test/android:chrome_java_integration_test_support",
"//components/browser_ui/bottomsheet/android:java",
"//components/commerce/core/android:core_java",
"//components/embedder_support/android:content_view_java",
"//components/messages/android:java",
"//components/messages/android/internal:java",
"//components/messages/android/internal:java_resources",
"//components/optimization_guide/proto:optimization_guide_proto_java",
"//components/page_info/android:java",
"//components/page_info/android:page_info_action_enum_java",
"//components/thin_webview:java",
"//components/url_formatter/android:url_formatter_java",
"//content/public/android:content_full_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:espresso_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_test_core_java",
"//third_party/androidx:androidx_test_rules_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/hamcrest:hamcrest_core_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java_test_support",
"//ui/android:ui_no_recycler_view_java",
"//url:gurl_java",
]
}
generate_jni("jni_headers") {
sources = [
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsEvent.java",
"java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsEventStorage.java",
]
}