# 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("jni_headers") {
sources = [ "java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxBridge.java" ]
}
android_library("java") {
sources = [
"java/src/org/chromium/chrome/browser/privacy_sandbox/ActivityTypeMapper.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/AdMeasurementFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/FledgeAllSitesFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/FledgeBlockedSitesFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/FledgeFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/FledgeLearnMoreFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/FledgePreference.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PreferenceCategoryWithClickableSummary.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxBridge.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxDialogConsentEEA.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxDialogController.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxDialogNoticeEEA.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxDialogNoticeROW.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxDialogNoticeRestricted.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxDialogUtils.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxHelpers.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxReferrer.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsBaseFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSnackbarController.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/Topic.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicPreference.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicSwitchPreference.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicsBlockedFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicsFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicsHeaderPreference.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicsLearnMoreFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicsManageFragment.java",
"java/src/org/chromium/chrome/browser/privacy_sandbox/TopicsUtils.java",
]
deps = [
":java_resources",
"//base:base_java",
"//build/android:build_java",
"//chrome/browser/android/browserservices/intents:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:java",
"//chrome/browser/ui/messages/android:java",
"//components/browser_ui/bottomsheet/android:java",
"//components/browser_ui/modaldialog/android:java",
"//components/browser_ui/settings/android:java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/util/android:java",
"//components/browser_ui/widget/android:java",
"//components/favicon/android:java",
"//components/prefs/android:java",
"//components/privacy_sandbox/android:java",
"//components/user_prefs/android:java",
"//content/public/android:content_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_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",
"//url:gurl_java",
]
srcjar_deps = [
":jni_headers",
":privacy_sandbox_enums",
]
resources_package = "org.chromium.chrome.browser.privacy_sandbox"
}
android_library("javatests") {
testonly = true
resources_package = "org.chromium.chrome.browser.privacy_sandbox"
sources = [
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/AdMeasurementFragmentTest.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/FakePrivacySandboxBridge.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/FledgeFragmentTest.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxBridgeTest.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxDialogTest.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragmentTest.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxTestUtils.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/TopicsFragmentTest.java",
"javatests/src/org/chromium/chrome/browser/privacy_sandbox/TopicsManageFragmentTest.java",
]
deps = [
":java",
":java_resources",
"//base:base_java",
"//base:base_java_test_support",
"//base/test:test_support_java",
"//chrome/android:chrome_java",
"//chrome/android:chrome_test_util_java",
"//chrome/browser/android/browserservices/intents:java",
"//chrome/browser/flags:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/settings:factory_java",
"//chrome/browser/settings:test_support_java",
"//chrome/browser/tab:java",
"//chrome/test/android:chrome_java_integration_test_support",
"//components/browser_ui/settings/android:java",
"//components/embedder_support/android:util_java",
"//components/policy/android:policy_java_test_support",
"//components/prefs/android:java",
"//components/security_state/content/android:java",
"//components/security_state/core:security_state_enums_java",
"//components/user_prefs/android:java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//net/android:net_java_test_support",
"//third_party/android_deps:espresso_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_fragment_fragment_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:junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java_test_support",
]
}
android_resources("java_resources") {
sources = [
"java/res/drawable-night/privacy_sandbox_interests_illustration.xml",
"java/res/drawable-night/privacy_sandbox_notice_eea_illustration.xml",
"java/res/drawable/ic_arrow_down.xml",
"java/res/drawable/ic_auto_delete_24dp.xml",
"java/res/drawable/ic_background_replace_24dp.xml",
"java/res/drawable/ic_checklist_24dp.xml",
"java/res/drawable/ic_delete_24dp.xml",
"java/res/drawable/ic_devices_24dp.xml",
"java/res/drawable/ic_filter_list_24dp.xml",
"java/res/drawable/ic_interests_24dp.xml",
"java/res/drawable/privacy_sandbox_interests_illustration.xml",
"java/res/drawable/privacy_sandbox_notice_eea_illustration.xml",
"java/res/drawable/topic_taxonomy_1_id_1.xml",
"java/res/drawable/topic_taxonomy_1_id_100.xml",
"java/res/drawable/topic_taxonomy_1_id_103.xml",
"java/res/drawable/topic_taxonomy_1_id_126.xml",
"java/res/drawable/topic_taxonomy_1_id_149.xml",
"java/res/drawable/topic_taxonomy_1_id_172.xml",
"java/res/drawable/topic_taxonomy_1_id_180.xml",
"java/res/drawable/topic_taxonomy_1_id_196.xml",
"java/res/drawable/topic_taxonomy_1_id_207.xml",
"java/res/drawable/topic_taxonomy_1_id_215.xml",
"java/res/drawable/topic_taxonomy_1_id_226.xml",
"java/res/drawable/topic_taxonomy_1_id_239.xml",
"java/res/drawable/topic_taxonomy_1_id_243.xml",
"java/res/drawable/topic_taxonomy_1_id_250.xml",
"java/res/drawable/topic_taxonomy_1_id_254.xml",
"java/res/drawable/topic_taxonomy_1_id_263.xml",
"java/res/drawable/topic_taxonomy_1_id_272.xml",
"java/res/drawable/topic_taxonomy_1_id_289.xml",
"java/res/drawable/topic_taxonomy_1_id_299.xml",
"java/res/drawable/topic_taxonomy_1_id_332.xml",
"java/res/drawable/topic_taxonomy_1_id_57.xml",
"java/res/drawable/topic_taxonomy_1_id_86.xml",
"java/res/drawable/topic_taxonomy_placeholder.xml",
"java/res/layout/category_with_clickable_summary_preference.xml",
"java/res/layout/privacy_sandbox_consent_eea.xml",
"java/res/layout/privacy_sandbox_consent_eea_dropdown.xml",
"java/res/layout/privacy_sandbox_notice_eea.xml",
"java/res/layout/privacy_sandbox_notice_eea_dropdown.xml",
"java/res/layout/privacy_sandbox_notice_restricted.xml",
"java/res/layout/privacy_sandbox_notice_row.xml",
"java/res/layout/privacy_sandbox_notice_row_dropdown.xml",
"java/res/layout/topics_explanation_summary.xml",
"java/res/raw/keep_topic_taxonomy.xml",
"java/res/values/dimens.xml",
"java/res/xml/ad_measurement_preference.xml",
"java/res/xml/block_list_preference.xml",
"java/res/xml/fledge_learn_more_preference.xml",
"java/res/xml/fledge_preference.xml",
"java/res/xml/privacy_sandbox_preferences.xml",
"java/res/xml/privacy_sandbox_preferences_restricted.xml",
"java/res/xml/topics_learn_more_preference.xml",
"java/res/xml/topics_manage_preference.xml",
"java/res/xml/topics_preference.xml",
"java/res/xml/topics_preference_v2.xml",
]
deps = [
"//chrome/browser/ui/android/strings:ui_strings_grd",
"//components/browser_ui/settings/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",
"//components/messages/android/internal:java_resources",
"//components/strings:components_strings_grd",
"//components/strings:privacy_sandbox_strings_grd",
"//third_party/android_deps:material_design_java",
]
}
java_cpp_enum("privacy_sandbox_enums") {
sources = [ "//chrome/browser/privacy_sandbox/privacy_sandbox_service.h" ]
}