# Copyright 2016 The Chromium Authors. All rights reserved. # 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/common/features.gni") import("//device/vr/buildflags/buildflags.gni") import("//testing/test.gni") assert(enable_vr) static_library("vr_android") { defines = [] sources = [ "android_ui_gesture_target.cc", "android_ui_gesture_target.h", "android_vsync_helper.cc", "android_vsync_helper.h", "autocomplete_controller.cc", "autocomplete_controller.h", "gl_browser_interface.h", "gvr_keyboard_delegate.cc", "gvr_keyboard_delegate.h", "gvr_keyboard_shim.cc", "gvr_util.cc", "gvr_util.h", "mailbox_to_surface_bridge.cc", "mailbox_to_surface_bridge.h", "metrics_util_android.cc", "metrics_util_android.h", "scoped_gpu_trace.cc", "scoped_gpu_trace.h", "vr_controller.cc", "vr_controller.h", "vr_core_info.cc", "vr_core_info.h", "vr_gl_thread.cc", "vr_gl_thread.h", "vr_input_connection.cc", "vr_input_connection.h", "vr_shell.cc", "vr_shell.h", "vr_shell_delegate.cc", "vr_shell_delegate.h", "vr_shell_gl.cc", "vr_shell_gl.h", "vr_web_contents_observer.cc", "vr_web_contents_observer.h", ] if (enable_arcore) { sources += [ "arcore_device/ar_image_transport.cc", "arcore_device/ar_image_transport.h", "arcore_device/arcore.h", "arcore_device/arcore_device.cc", "arcore_device/arcore_device.h", "arcore_device/arcore_device_provider.cc", "arcore_device/arcore_device_provider.h", "arcore_device/arcore_gl.cc", "arcore_device/arcore_gl.h", "arcore_device/arcore_gl_thread.cc", "arcore_device/arcore_gl_thread.h", "arcore_device/arcore_impl.cc", "arcore_device/arcore_impl.h", "arcore_device/arcore_java_utils.cc", "arcore_device/arcore_java_utils.h", "arcore_device/arcore_shim.cc", "arcore_device/arcore_shim.h", "arcore_device/fake_arcore.cc", "arcore_device/fake_arcore.h", ] } deps = [ ":vr_shell_jni_headers", "//base", "//cc", "//chrome/browser/vr:vr_common", "//components/omnibox/browser", "//components/rappor", "//content/public/browser", "//content/public/common", "//device/gamepad", "//device/vr", "//services/device/public/mojom", "//services/metrics/public/cpp:ukm_builders", "//services/ui/public/cpp/gpu", "//third_party/gvr-android-sdk:gvr_shim", "//ui/android", "//ui/base", "//ui/display", "//ui/gl", "//ui/gl/init", ] if (enable_arcore) { deps += [ ":ar_jni_headers" ] } public_deps = [ "//device/vr/public/mojom", ] libs = [ "android" ] configs += [ "//third_party/gvr-android-keyboard:kb_config", "//third_party/gvr-android-sdk:libgvr_config", ] if (enable_arcore) { configs += [ "//third_party/arcore-android-sdk:libarcore_config" ] } } generate_jni("vr_shell_jni_headers") { sources = [ "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/AndroidUiGestureTarget.java", "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/AndroidVSyncHelper.java", "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrCoreInfo.java", "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrInputConnection.java", "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java", "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java", "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/keyboard/GvrKeyboardLoaderClient.java", "//chrome/android/java/src/org/chromium/chrome/browser/vr_shell/keyboard/TextEditAction.java", ] jni_package = "vr_shell" } if (enable_arcore) { generate_jni("ar_jni_headers") { sources = [ "//chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java", ] jni_package = "vr" } }