chromium/chrome/browser/ui/android/edge_to_edge/BUILD.gn

# Copyright 2023 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") {
  srcjar_deps = [ ":jni_headers" ]
  sources = [
    "java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeBottomChinSceneLayer.java",
    "java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeController.java",
    "java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgePadAdjuster.java",
    "java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeSupplier.java",
    "java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeUtils.java",
    "java/src/org/chromium/chrome/browser/ui/edge_to_edge/NavigationBarColorProvider.java",
  ]
  deps = [
    "//base:base_cached_flags_java",
    "//base:base_java",
    "//chrome/browser/android/lifecycle:java",
    "//chrome/browser/browser_controls/android:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/ui/android/layouts:java",
    "//components/browser_ui/display_cutout/android:java",
    "//content/public/android:content_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/blink/public/mojom:mojom_core_java",
    "//third_party/jni_zero:jni_zero_java",
    "//ui/android:ui_java",
  ]
}

generate_jni("jni_headers") {
  sources = [ "java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeBottomChinSceneLayer.java" ]
}

android_library_factory("factory_java") {
  # These deps will be inherited by the resulting android_library target.
  deps = [
    ":java",
    "//base:base_java",
    "//chrome/browser/browser_controls/android:java",
    "//chrome/browser/fullscreen/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/ui/android/layouts:java",
    "//third_party/androidx:androidx_appcompat_appcompat_java",
    "//ui/android:ui_no_recycler_view_java",
    "//ui/android:ui_utils_java",
  ]

  # This internal file will be replaced by a generated file so the resulting
  # android_library target does not actually depend on this internal file.
  sources = [ "//chrome/browser/ui/android/edge_to_edge/internal/java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeControllerFactory.java" ]
}