# 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("//chrome/android/features/android_library_factory_tmpl.gni")
import("//third_party/jni_zero/jni_zero.gni")
generate_jni("jni_headers") {
sources = [
"java/src/org/chromium/chrome/browser/feedback/FamilyInfoFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/ProcessIdFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/SystemInfoFeedbackSource.java",
]
}
source_set("android") {
sources = [
"process_id_feedback_source.cc",
"process_id_feedback_source.h",
"system_info_feedback_source.cc",
]
deps = [
":jni_headers",
"//base",
"//content/public/browser",
"//gpu/config",
]
}
android_library_factory("factory_java") {
deps = [
":java",
"//chrome/browser/profiles/android:java",
]
sources = [ "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherFactory.java" ]
}
android_library("internal_java") {
deps = [
":java",
"//base:resetters_java",
# Exception: depends on :chrome_java for HelpAndFeedbackLauncherImpl.
"//chrome/android:chrome_java",
"//chrome/browser/profiles/android:java",
]
sources = [ "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherFactory.java" ]
}
android_library("java") {
srcjar_deps = [ ":jni_headers" ]
sources = [
"java/src/org/chromium/chrome/browser/feedback/AsyncFeedbackSourceAdapter.java",
"java/src/org/chromium/chrome/browser/feedback/DeviceInfoFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/FamilyInfoFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/FeedbackContextFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncher.java",
"java/src/org/chromium/chrome/browser/feedback/IMEFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/InterestFeedFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/LowEndDeviceFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/PermissionFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/ProcessIdFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/SystemInfoFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/UrlFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/VariationsFeedbackSource.java",
]
deps = [
":delegate_java",
":feedback_collector_java",
":java_resources",
"//base:base_java",
"//build/android:build_java",
"//chrome/browser/flags:java",
"//chrome/browser/profiles/android:java",
"//components/browser_ui/util/android:java",
"//components/variations/android:variations_java",
"//content/public/android:content_java",
"//net/android:net_java",
"//third_party/android_deps:guava_android_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_no_recycler_view_java",
]
public_deps = [
":delegate_java",
":feedback_collector_java",
]
resources_package = "org.chromium.chrome.browser.feedback"
}
android_library("feedback_collector_java") {
sources = [
"java/src/org/chromium/chrome/browser/feedback/AsyncFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java",
"java/src/org/chromium/chrome/browser/feedback/FeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/HistogramFeedbackSource.java",
"java/src/org/chromium/chrome/browser/feedback/ScreenshotSource.java",
"java/src/org/chromium/chrome/browser/feedback/StaticScreenshotSource.java",
]
deps = [
"//base:base_java",
"//build/android:build_java",
"//chrome/browser/profiles/android:java",
"//chrome/browser/signin/services/android:java",
"//components/browser_ui/util/android:java",
"//components/signin/public/android:java",
"//third_party/android_deps:guava_android_java",
"//third_party/androidx:androidx_annotation_annotation_java",
]
}
android_library("delegate_java") {
sources = [
"java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherDelegate.java",
"java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherDelegateImpl.java",
]
deps = [
":feedback_collector_java",
"//base:base_java",
"//third_party/androidx:androidx_annotation_annotation_java",
]
# Add the actual implementation where necessary so that downstream targets
# can provide their own implementations.
jar_excluded_patterns = [ "*/HelpAndFeedbackLauncherDelegateImpl.class" ]
}
android_library("delegate_public_impl_java") {
sources = [ "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherDelegateImpl.java" ]
deps = [
":delegate_java",
":feedback_collector_java",
"//base:base_java",
"//third_party/androidx:androidx_annotation_annotation_java",
]
}
android_resources("java_resources") {
sources = [ "java/res/values/strings.xml" ]
}