# 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")
android_library("java") {
srcjar_deps = [ ":layouts_jni_headers" ]
sources = [
"java/src/org/chromium/chrome/browser/layouts/CompositorModelChangeProcessor.java",
"java/src/org/chromium/chrome/browser/layouts/EventFilter.java",
"java/src/org/chromium/chrome/browser/layouts/FilterLayoutStateObserver.java",
"java/src/org/chromium/chrome/browser/layouts/LayoutManager.java",
"java/src/org/chromium/chrome/browser/layouts/LayoutManagerProvider.java",
"java/src/org/chromium/chrome/browser/layouts/LayoutStateProvider.java",
"java/src/org/chromium/chrome/browser/layouts/LayoutType.java",
"java/src/org/chromium/chrome/browser/layouts/SceneOverlay.java",
"java/src/org/chromium/chrome/browser/layouts/animation/CompositorAnimationHandler.java",
"java/src/org/chromium/chrome/browser/layouts/animation/CompositorAnimator.java",
"java/src/org/chromium/chrome/browser/layouts/components/VirtualView.java",
"java/src/org/chromium/chrome/browser/layouts/scene_layer/SceneLayer.java",
"java/src/org/chromium/chrome/browser/layouts/scene_layer/SceneOverlayLayer.java",
]
deps = [
"//base:base_java",
"//build/android:build_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",
]
}
source_set("android") {
sources = [
"scene_layer.cc",
"scene_layer.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":layouts_jni_headers",
"//cc/slim",
"//skia",
]
}
generate_jni("layouts_jni_headers") {
sources = [
"java/src/org/chromium/chrome/browser/layouts/scene_layer/SceneLayer.java",
]
}
robolectric_library("junit") {
sources = [
"java/src/org/chromium/chrome/browser/layouts/CompositorModelChangeProcessorUnitTest.java",
"java/src/org/chromium/chrome/browser/layouts/FilterLayoutStateObserverTest.java",
"java/src/org/chromium/chrome/browser/layouts/animation/CompositorAnimationHandlerTest.java",
"java/src/org/chromium/chrome/browser/layouts/animation/CompositorAnimatorTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java",
]
}