# 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")
generate_jni("site_settings_jni_headers") {
sources = [ "java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java" ]
}
source_set("android") {
sources = [
"storage_info_fetcher.cc",
"storage_info_fetcher.h",
"website_preference_bridge.cc",
"website_preference_bridge_util.cc",
"website_preference_bridge_util.h",
]
deps = [
":site_settings_jni_headers",
"//base",
"//components/browsing_data/content",
"//components/cdm/browser",
"//components/content_settings/browser/ui",
"//components/content_settings/core/browser",
"//components/content_settings/core/browser:cookie_settings",
"//components/permissions",
"//components/subresource_filter/android",
"//components/user_prefs",
"//content/public/browser",
"//services/device/public/cpp:device_feature_list",
"//services/network/public/mojom",
"//storage/browser",
"//url",
]
}
source_set("unit_tests") {
testonly = true
sources = [ "website_preference_bridge_util_unittest.cc" ]
deps = [
":android",
"//content/public/browser",
"//content/test:test_support",
"//testing/gtest",
]
}
# Constants only target without dependencies to allow embedders to only include relevant code.
android_library("constants_java") {
sources = [ "java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettingsConstants.java" ]
}
android_library("java") {
sources = [
"java/src/org/chromium/components/browser_ui/site_settings/AddExceptionPreference.java",
"java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/AutoDarkMetrics.java",
"java/src/org/chromium/components/browser_ui/site_settings/BaseSiteSettingsFragment.java",
"java/src/org/chromium/components/browser_ui/site_settings/ChosenObjectInfo.java",
"java/src/org/chromium/components/browser_ui/site_settings/ChosenObjectSettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/ClearWebsiteStorage.java",
"java/src/org/chromium/components/browser_ui/site_settings/ClearWebsiteStorageDialog.java",
"java/src/org/chromium/components/browser_ui/site_settings/ContentSettingException.java",
"java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java",
"java/src/org/chromium/components/browser_ui/site_settings/CookiesInfo.java",
"java/src/org/chromium/components/browser_ui/site_settings/DesktopSiteMetrics.java",
"java/src/org/chromium/components/browser_ui/site_settings/ForwardingManagedPreferenceDelegate.java",
"java/src/org/chromium/components/browser_ui/site_settings/GroupedWebsitesActivityHolder.java",
"java/src/org/chromium/components/browser_ui/site_settings/GroupedWebsitesSettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/LocalStorageInfo.java",
"java/src/org/chromium/components/browser_ui/site_settings/LocationCategory.java",
"java/src/org/chromium/components/browser_ui/site_settings/NfcCategory.java",
"java/src/org/chromium/components/browser_ui/site_settings/NotificationCategory.java",
"java/src/org/chromium/components/browser_ui/site_settings/PermissionInfo.java",
"java/src/org/chromium/components/browser_ui/site_settings/RWSCookieInfo.java",
"java/src/org/chromium/components/browser_ui/site_settings/RWSCookieSettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/RwsRowPreference.java",
"java/src/org/chromium/components/browser_ui/site_settings/SharedDictionaryInfo.java",
"java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/SiteDataCleaner.java",
"java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java",
"java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java",
"java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsUtil.java",
"java/src/org/chromium/components/browser_ui/site_settings/StorageAccessSubpageSettings.java",
"java/src/org/chromium/components/browser_ui/site_settings/StorageAccessWebsitePreference.java",
"java/src/org/chromium/components/browser_ui/site_settings/StorageInfo.java",
"java/src/org/chromium/components/browser_ui/site_settings/TriStateCookieSettingsPreference.java",
"java/src/org/chromium/components/browser_ui/site_settings/TriStatePermissionPreference.java",
"java/src/org/chromium/components/browser_ui/site_settings/TriStateSiteSettingsPreference.java",
"java/src/org/chromium/components/browser_ui/site_settings/Website.java",
"java/src/org/chromium/components/browser_ui/site_settings/WebsiteAddress.java",
"java/src/org/chromium/components/browser_ui/site_settings/WebsiteEntry.java",
"java/src/org/chromium/components/browser_ui/site_settings/WebsiteGroup.java",
"java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java",
"java/src/org/chromium/components/browser_ui/site_settings/WebsitePreference.java",
"java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java",
"java/src/org/chromium/components/browser_ui/site_settings/WebsiteRowPreference.java",
]
resources_package = "org.chromium.components.browser_ui.site_settings"
deps = [
":java_resources",
"//base:base_java",
"//build/android:build_java",
"//chrome/browser/flags:java",
"//components/browser_ui/accessibility/android:page_zoom_utils_java",
"//components/browser_ui/modaldialog/android:java",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/site_settings/android:constants_java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/widget/android:java",
"//components/browsing_data/content/android:java",
"//components/browsing_data/core:java",
"//components/content_settings/android:content_settings_enums_java",
"//components/content_settings/android:java",
"//components/embedder_support/android:util_java",
"//components/location/android:location_java",
"//components/permissions/android:core_java",
"//components/permissions/android:java",
"//components/prefs/android:java",
"//components/subresource_filter/android:java",
"//components/url_formatter/android:url_formatter_java",
"//components/user_prefs/android:java",
"//content/public/android:content_java",
"//services/device/public/java:device_feature_list_java",
"//third_party/android_deps:guava_android_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_browser_browser_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_fragment_fragment_java",
"//third_party/androidx:androidx_preference_preference_java",
"//third_party/androidx:androidx_recyclerview_recyclerview_java",
"//third_party/androidx:androidx_vectordrawable_vectordrawable_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_full_java",
"//ui/android:ui_utils_java",
"//url:gurl_java",
]
srcjar_deps = [
":site_settings_jni_headers",
"//components/content_settings/android:java_pref_names_srcjar",
]
}
android_library("javatests") {
testonly = true
sources = [
"javatests/src/org/chromium/components/browser_ui/site_settings/RwsRowPreferenceTest.java",
"javatests/src/org/chromium/components/browser_ui/site_settings/WebsiteAddressTest.java",
"javatests/src/org/chromium/components/browser_ui/site_settings/WebsiteGroupTest.java",
"javatests/src/org/chromium/components/browser_ui/site_settings/WebsiteRowPreferenceTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//components/browser_ui/settings/android:test_support_java",
"//content/public/android:content_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",
"//url:gurl_java",
]
}
robolectric_library("junit") {
sources = [
"junit/src/org/chromium/components/browser_ui/site_settings/AddExceptionPreferenceUnitTest.java",
"junit/src/org/chromium/components/browser_ui/site_settings/DesktopSiteMetricsUnitTest.java",
"junit/src/org/chromium/components/browser_ui/site_settings/SiteDataCleanerUnitTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//components/browsing_data/content/android:java",
"//components/content_settings/android:content_settings_enums_java",
"//content/public/android:content_java",
"//third_party/jni_zero:jni_zero_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//url:url_java",
]
}
android_resources("java_resources") {
sources = [
"java/res/drawable-hdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-hdpi/permission_background_sync.png",
"java/res/drawable-hdpi/permission_javascript.png",
"java/res/drawable-hdpi/permission_popups.png",
"java/res/drawable-hdpi/permission_protected_media.png",
"java/res/drawable-hdpi/settings_sensors.png",
"java/res/drawable-hdpi/web_asset.png",
"java/res/drawable-mdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-mdpi/permission_background_sync.png",
"java/res/drawable-mdpi/permission_javascript.png",
"java/res/drawable-mdpi/permission_popups.png",
"java/res/drawable-mdpi/permission_protected_media.png",
"java/res/drawable-mdpi/settings_sensors.png",
"java/res/drawable-mdpi/web_asset.png",
"java/res/drawable-xhdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-xhdpi/permission_background_sync.png",
"java/res/drawable-xhdpi/permission_javascript.png",
"java/res/drawable-xhdpi/permission_popups.png",
"java/res/drawable-xhdpi/permission_protected_media.png",
"java/res/drawable-xhdpi/settings_sensors.png",
"java/res/drawable-xhdpi/web_asset.png",
"java/res/drawable-xxhdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-xxhdpi/permission_background_sync.png",
"java/res/drawable-xxhdpi/permission_javascript.png",
"java/res/drawable-xxhdpi/permission_popups.png",
"java/res/drawable-xxhdpi/permission_protected_media.png",
"java/res/drawable-xxhdpi/settings_sensors.png",
"java/res/drawable-xxhdpi/web_asset.png",
"java/res/drawable-xxxhdpi/ic_volume_up_grey600_24dp.png",
"java/res/drawable-xxxhdpi/permission_background_sync.png",
"java/res/drawable-xxxhdpi/permission_javascript.png",
"java/res/drawable-xxxhdpi/permission_popups.png",
"java/res/drawable-xxxhdpi/permission_protected_media.png",
"java/res/drawable-xxxhdpi/settings_sensors.png",
"java/res/drawable-xxxhdpi/web_asset.png",
"java/res/drawable/gm_database_24.xml",
"java/res/drawable/ic_account_attention.xml",
"java/res/drawable/ic_archive.xml",
"java/res/drawable/ic_background_replace.xml",
"java/res/drawable/ic_block.xml",
"java/res/drawable/ic_dashboard.xml",
"java/res/drawable/ic_person_24dp.xml",
"java/res/drawable/ic_timer.xml",
"java/res/drawable/settings_bluetooth.xml",
"java/res/layout/add_site_dialog.xml",
"java/res/layout/clear_data_dialog.xml",
"java/res/layout/clear_reset_dialog.xml",
"java/res/layout/clear_storage.xml",
"java/res/layout/edit_site_dialog_content.xml",
"java/res/layout/storage_preferences_view.xml",
"java/res/layout/tri_state_cookie_settings_preference.xml",
"java/res/layout/tri_state_permission_preference.xml",
"java/res/layout/tri_state_site_settings_preference.xml",
"java/res/layout/website_features.xml",
"java/res/layout/zoom_preferences_view.xml",
"java/res/menu/website_preferences_menu.xml",
"java/res/values/dimens.xml",
"java/res/values/ids.xml",
"java/res/xml/all_site_preferences.xml",
"java/res/xml/all_site_preferences_v2.xml",
"java/res/xml/grouped_websites_preferences.xml",
"java/res/xml/rws_cookie_settings.xml",
"java/res/xml/single_website_preferences.xml",
"java/res/xml/site_settings_preferences.xml",
"java/res/xml/storage_access_settings.xml",
"java/res/xml/website_preferences.xml",
]
deps = [
"//components/browser_ui/accessibility/android:java_resources",
"//components/browser_ui/settings/android:java_resources",
"//components/browser_ui/strings/android:browser_ui_strings_grd",
"//components/browser_ui/styles/android:java_resources",
"//components/permissions/android:java_resources",
]
}