# 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")
android_library("java") {
sources = [
"java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetContent.java",
"java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetController.java",
"java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetControllerProvider.java",
"java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetObserver.java",
"java/src/org/chromium/components/browser_ui/bottomsheet/EmptyBottomSheetObserver.java",
"java/src/org/chromium/components/browser_ui/bottomsheet/ExpandedSheetHelper.java",
]
deps = [
":java_resources",
"//base:base_java",
"//components/browser_ui/styles/android:java",
"//components/browser_ui/widget/android:java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/jni_zero:jni_zero_java",
"//ui/android:ui_java",
]
resources_package = "org.chromium.components.browser_ui.bottomsheet"
}
android_resources("java_resources") {
sources = [
"java/res/layout/bottom_sheet.xml",
"java/res/layout/bottom_sheet_handlebar.xml",
"java/res/values/dimens.xml",
]
deps = [ "//components/browser_ui/strings/android:browser_ui_strings_grd" ]
}
# The only dependent on this code outside of this component should be glue.
android_library("manager_java") {
sources = [ "java/src/org/chromium/components/browser_ui/bottomsheet/ManagedBottomSheetController.java" ]
deps = [
":java",
"//components/browser_ui/widget/android:java",
"//ui/android:ui_full_java",
]
}
android_library_factory("factory_java") {
sources = [ "internal/java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetControllerFactory.java" ]
deps = [
":java",
":manager_java",
"//base:base_java",
"//components/browser_ui/widget/android:java",
"//ui/android:ui_full_java",
"//ui/android:ui_utils_java",
]
}
generate_jni("jni") {
sources = [ "java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetControllerProvider.java" ]
}