blob: bfdbca9101c75a09d1f3cea9d015be2e9c4ad2cd [file] [log] [blame]
# Copyright 2020 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/rules.gni")
import("//third_party/jni_zero/jni_zero.gni")
android_library("java") {
srcjar_deps = [ ":jni_headers" ]
sources = [
"java/src/org/chromium/chrome/browser/download/DownloadMessageUiControllerFactory.java",
"java/src/org/chromium/chrome/browser/download/DownloadMessageUiControllerImpl.java",
"java/src/org/chromium/chrome/browser/download/home/DownloadManagerCoordinatorFactory.java",
"java/src/org/chromium/chrome/browser/download/home/DownloadManagerCoordinatorImpl.java",
"java/src/org/chromium/chrome/browser/download/home/OfflineItemSource.java",
"java/src/org/chromium/chrome/browser/download/home/StableIds.java",
"java/src/org/chromium/chrome/browser/download/home/empty/EmptyCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/empty/EmptyProperties.java",
"java/src/org/chromium/chrome/browser/download/home/empty/EmptyView.java",
"java/src/org/chromium/chrome/browser/download/home/empty/EmptyViewBinder.java",
"java/src/org/chromium/chrome/browser/download/home/filter/DangerousOfflineItemFilter.java",
"java/src/org/chromium/chrome/browser/download/home/filter/DeleteUndoOfflineItemFilter.java",
"java/src/org/chromium/chrome/browser/download/home/filter/FilterChipsProvider.java",
"java/src/org/chromium/chrome/browser/download/home/filter/FilterCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/filter/FilterProperties.java",
"java/src/org/chromium/chrome/browser/download/home/filter/FilterView.java",
"java/src/org/chromium/chrome/browser/download/home/filter/FilterViewBinder.java",
"java/src/org/chromium/chrome/browser/download/home/filter/Filters.java",
"java/src/org/chromium/chrome/browser/download/home/filter/InvalidStateOfflineItemFilter.java",
"java/src/org/chromium/chrome/browser/download/home/filter/OffTheRecordOfflineItemFilter.java",
"java/src/org/chromium/chrome/browser/download/home/filter/OfflineItemFilter.java",
"java/src/org/chromium/chrome/browser/download/home/filter/OfflineItemFilterObserver.java",
"java/src/org/chromium/chrome/browser/download/home/filter/OfflineItemFilterSource.java",
"java/src/org/chromium/chrome/browser/download/home/filter/SearchOfflineItemFilter.java",
"java/src/org/chromium/chrome/browser/download/home/filter/TypeOfflineItemFilter.java",
"java/src/org/chromium/chrome/browser/download/home/glue/ThumbnailRequestGlue.java",
"java/src/org/chromium/chrome/browser/download/home/list/BatchListModel.java",
"java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMediator.java",
"java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java",
"java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewAdapter.java",
"java/src/org/chromium/chrome/browser/download/home/list/DecoratedListItemModel.java",
"java/src/org/chromium/chrome/browser/download/home/list/ItemUtils.java",
"java/src/org/chromium/chrome/browser/download/home/list/ListItem.java",
"java/src/org/chromium/chrome/browser/download/home/list/ListItemModel.java",
"java/src/org/chromium/chrome/browser/download/home/list/ListProperties.java",
"java/src/org/chromium/chrome/browser/download/home/list/ListPropertyViewBinder.java",
"java/src/org/chromium/chrome/browser/download/home/list/ListUtils.java",
"java/src/org/chromium/chrome/browser/download/home/list/ShareUtils.java",
"java/src/org/chromium/chrome/browser/download/home/list/UiUtils.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/AudioViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/CardDividerBottomViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/CardDividerMiddleViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/CardDividerTopViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/CardFooterViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/CardHeaderViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/CustomViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/GenericViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/ImageViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/InProgressGenericViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/InProgressImageViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/InProgressVideoViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/InProgressViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/ListItemViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/OfflineItemViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/PaginationViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/PrefetchArticleViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/PrefetchGroupedItemViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/SectionTitleViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/holder/VideoViewHolder.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/CardPaginator.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/DateLabelAdder.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/DateListPaginator.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/DateOrderedListMutator.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/DateSorter.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/DateSorterForCards.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/GroupCardLabelAdder.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/ListConsumer.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/ListItemPropertySetter.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/ListMutationController.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/NoopLabelAdder.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/PrefetchListPaginator.java",
"java/src/org/chromium/chrome/browser/download/home/list/mutator/ScoreComparator.java",
"java/src/org/chromium/chrome/browser/download/home/list/view/AspectRatioFrameLayout.java",
"java/src/org/chromium/chrome/browser/download/home/list/view/CircularProgressView.java",
"java/src/org/chromium/chrome/browser/download/home/metrics/FileExtensions.java",
"java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java",
"java/src/org/chromium/chrome/browser/download/home/rename/RenameDialogCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/rename/RenameDialogCustomView.java",
"java/src/org/chromium/chrome/browser/download/home/rename/RenameDialogManager.java",
"java/src/org/chromium/chrome/browser/download/home/rename/RenameExtensionDialogCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/rename/RenameUtils.java",
"java/src/org/chromium/chrome/browser/download/home/search/SearchBarCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/snackbars/DeleteUndoCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/snackbars/UndoUiUtils.java",
"java/src/org/chromium/chrome/browser/download/home/storage/StorageCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/storage/StorageSummaryProvider.java",
"java/src/org/chromium/chrome/browser/download/home/toolbar/DownloadHomeToolbar.java",
"java/src/org/chromium/chrome/browser/download/home/toolbar/ToolbarCoordinator.java",
"java/src/org/chromium/chrome/browser/download/home/toolbar/ToolbarUtils.java",
"java/src/org/chromium/chrome/browser/download/home/view/SelectionView.java",
"java/src/org/chromium/chrome/browser/download/interstitial/DownloadInterstitialCoordinatorFactory.java",
"java/src/org/chromium/chrome/browser/download/interstitial/DownloadInterstitialCoordinatorImpl.java",
"java/src/org/chromium/chrome/browser/download/interstitial/DownloadInterstitialMediator.java",
"java/src/org/chromium/chrome/browser/download/interstitial/DownloadInterstitialProperties.java",
"java/src/org/chromium/chrome/browser/download/interstitial/DownloadInterstitialView.java",
"java/src/org/chromium/chrome/browser/download/interstitial/DownloadInterstitialViewBinder.java",
]
deps = [
":java_resources",
"//base:base_java",
"//base:content_uri_utils_java",
"//build/android:build_java",
"//chrome/android:chrome_java",
"//chrome/browser/download/android:file_provider_java",
"//chrome/browser/download/android:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/thumbnail:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/browser/util:java",
"//components/browser_ui/modaldialog/android:java",
"//components/browser_ui/share/android:java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/widget/android:java",
"//components/download/public/common:public_java",
"//components/embedder_support/android:util_java",
"//components/feature_engagement:feature_engagement_java",
"//components/messages/android:java",
"//components/offline_items_collection/core:core_java",
"//components/prefs/android:java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//content/public/android:content_java",
"//third_party/android_deps:material_design_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_recyclerview_recyclerview_java",
"//third_party/androidx:androidx_vectordrawable_vectordrawable_animated_java",
"//third_party/androidx:androidx_vectordrawable_vectordrawable_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_java",
"//ui/edge_to_edge:java",
"//url:gurl_java",
]
resources_package = "org.chromium.chrome.browser.download.internal"
}
generate_jni("jni_headers") {
sources = [ "java/src/org/chromium/chrome/browser/download/home/rename/RenameUtils.java" ]
}
android_resources("java_resources") {
sources = [
"java/res/drawable/circular_progress_bar_background_large.xml",
"java/res/drawable/circular_progress_bar_background_small.xml",
"java/res/drawable/circular_progress_bar_determinate_large.xml",
"java/res/drawable/circular_progress_bar_determinate_small.xml",
"java/res/drawable/circular_progress_bar_indeterminate_large.xml",
"java/res/drawable/circular_progress_bar_indeterminate_small.xml",
"java/res/drawable/circular_progress_bar_pause_tiny.xml",
"java/res/drawable/circular_progress_bar_resume_tiny.xml",
"java/res/drawable/circular_progress_bar_retry_tiny.xml",
"java/res/drawable/circular_progress_bar_selector_large.xml",
"java/res/drawable/circular_progress_bar_selector_small.xml",
"java/res/drawable/download_interstitial_icon.xml",
"java/res/drawable/download_manager_image_background.xml",
"java/res/drawable/download_manager_item_background.xml",
"java/res/drawable/download_search_bar_background.xml",
"java/res/drawable/downloading_fill_animation_24dp.xml",
"java/res/drawable/downloads_empty_state_illustration.xml",
"java/res/drawable/group_card_footer_curved_border.xml",
"java/res/drawable/group_card_header_curved_border.xml",
"java/res/drawable/group_card_item_border.xml",
"java/res/drawable/infobar_download_complete_animation.xml",
"java/res/layout/download_home_tabs.xml",
"java/res/layout/download_home_toolbar.xml",
"java/res/layout/download_interstitial.xml",
"java/res/layout/download_manager_audio.xml",
"java/res/layout/download_manager_card_divider_bottom.xml",
"java/res/layout/download_manager_card_divider_middle.xml",
"java/res/layout/download_manager_card_divider_top.xml",
"java/res/layout/download_manager_card_footer.xml",
"java/res/layout/download_manager_card_header.xml",
"java/res/layout/download_manager_generic_item.xml",
"java/res/layout/download_manager_image_item.xml",
"java/res/layout/download_manager_in_progress_image_item.xml",
"java/res/layout/download_manager_in_progress_item.xml",
"java/res/layout/download_manager_in_progress_video_item.xml",
"java/res/layout/download_manager_pagination_header.xml",
"java/res/layout/download_manager_prefetch_article.xml",
"java/res/layout/download_manager_prefetch_grouped_item.xml",
"java/res/layout/download_manager_section_header.xml",
"java/res/layout/download_manager_video_item.xml",
"java/res/layout/download_rename_custom_dialog.xml",
"java/res/layout/download_rename_extension_custom_dialog.xml",
"java/res/layout/download_search_bar.xml",
"java/res/layout/download_storage_summary.xml",
"java/res/layout/downloads_empty_state_view.xml",
"java/res/layout/list_selection_handle_view.xml",
"java/res/menu/download_manager_menu.xml",
"java/res/values-sw600dp/dimens.xml",
"java/res/values/attrs.xml",
"java/res/values/dimens.xml",
"java/res/values/ids.xml",
"java/res/values/styles.xml",
]
deps = [
"//chrome/browser/download/android:java_resources",
"//chrome/browser/ui/android/favicon:java_resources",
"//chrome/browser/ui/android/strings:ui_strings_grd",
"//components/browser_ui/modaldialog/android:java_resources",
"//components/browser_ui/strings/android:browser_ui_strings_grd",
"//components/browser_ui/styles/android:java_resources",
"//components/browser_ui/widget/android:java_resources",
"//content/public/android:content_java_resources",
"//ui/android:ui_java_resources",
]
}
android_library("javatests") {
testonly = true
sources = [ "java/src/org/chromium/chrome/browser/download/DownloadMessageUiControllerTest.java" ]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/browser/download/android:java",
"//chrome/browser/flags:java",
"//chrome/browser/profiles/android:java",
"//chrome/test/android:chrome_java_integration_test_support",
"//components/cached_flags:java",
"//components/download/public/common:public_java",
"//components/messages/android:java",
"//components/offline_items_collection/core:core_java",
"//content/public/test/android:content_java_test_support",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_test_core_java",
"//third_party/androidx:androidx_test_monitor_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/hamcrest:hamcrest_java",
"//third_party/hamcrest:hamcrest_library_java",
"//third_party/junit",
"//ui/android:ui_java",
"//ui/android:ui_java_test_support",
"//ui/edge_to_edge:java",
"//url:gurl_java",
"//url:gurl_junit_test_support",
]
resources_package = "org.chromium.chrome.browser.download.internal"
}
android_library("unit_device_javatests") {
testonly = true
sources = [
"java/src/org/chromium/chrome/browser/download/home/DownloadActivityV2Test.java",
"java/src/org/chromium/chrome/browser/download/home/StubbedOfflineContentProvider.java",
"java/src/org/chromium/chrome/browser/download/home/StubbedProvider.java",
"java/src/org/chromium/chrome/browser/download/interstitial/DownloadInterstitialMediatorTest.java",
]
deps = [
":java",
":java_resources",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:chrome_java",
"//chrome/browser/back_press/android:java",
"//chrome/browser/download/android:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/ui/android/edge_to_edge:factory_java",
"//chrome/browser/ui/android/edge_to_edge:java",
"//chrome/browser/ui/messages/android:java",
"//chrome/test/android:chrome_java_integration_test_support",
"//components/browser_ui/modaldialog/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/widget/android:java",
"//components/download/public/common:public_java",
"//components/embedder_support/android:util_java",
"//components/feature_engagement:feature_engagement_java",
"//components/messages/android:java",
"//components/offline_items_collection/core:core_java",
"//components/prefs/android:java",
"//components/url_formatter/android:url_formatter_java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:espresso_java",
"//third_party/androidx:androidx_activity_activity_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_appcompat_appcompat_java",
"//third_party/androidx:androidx_appcompat_appcompat_resources_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_lifecycle_lifecycle_common_java",
"//third_party/androidx:androidx_recyclerview_recyclerview_java",
"//third_party/androidx:androidx_test_core_java",
"//third_party/androidx:androidx_test_monitor_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/hamcrest:hamcrest_core_java",
"//third_party/hamcrest:hamcrest_library_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java",
"//ui/android:ui_java_test_support",
"//ui/edge_to_edge:java",
"//url:gurl_java",
"//url:gurl_junit_test_support",
]
resources_package = "org.chromium.chrome.browser.download.internal"
}
robolectric_library("junit") {
sources = [
"java/src/org/chromium/chrome/browser/download/home/filter/DeleteUndoOfflineItemFilterTest.java",
"java/src/org/chromium/chrome/browser/download/home/filter/FiltersTest.java",
"java/src/org/chromium/chrome/browser/download/home/filter/OffTheRecordOfflineItemFilterTest.java",
"java/src/org/chromium/chrome/browser/download/home/filter/OfflineItemFilterTest.java",
"java/src/org/chromium/chrome/browser/download/home/filter/SearchOfflineItemFilterTest.java",
"java/src/org/chromium/chrome/browser/download/home/filter/TypeOfflineItemFilterTest.java",
"java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutatorTest.java",
"java/src/org/chromium/chrome/browser/download/home/list/ItemUtilsTest.java",
"java/src/org/chromium/chrome/browser/download/home/list/ShareUtilsTest.java",
"java/src/org/chromium/chrome/browser/download/home/list/UiUtilsTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//chrome/browser/download/android:java",
"//chrome/browser/profiles/android:java",
"//components/browser_ui/util/android:java",
"//components/offline_items_collection/core:core_java",
"//components/url_formatter/android:url_formatter_java",
"//content/public/test/android:content_java_test_support",
"//third_party/androidx:androidx_core_core_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_full_java",
"//url:gurl_java",
"//url:gurl_junit_test_support",
]
resources_package = "org.chromium.chrome.browser.download.internal"
}
source_set("android") {
visibility = [ "//chrome/browser" ]
sources = [ "rename_utils.cc" ]
deps = [
":jni_headers",
"//base",
]
}