naiveproxy/chrome/browser/android/vr/BUILD.gn
2018-12-09 21:59:24 -05:00

217 lines
8.1 KiB
Plaintext

# 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_controller_delegate.cc",
"gvr_controller_delegate.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",
"register_jni.h",
"render_loop_factory.cc",
"render_loop_factory.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_module_provider.cc",
"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",
"web_xr_presentation_state.cc",
"web_xr_presentation_state.h",
]
if (enable_arcore) {
sources += [
"arcore_device/ar_image_transport.cc",
"arcore_device/ar_image_transport.h",
"arcore_device/ar_renderer.cc",
"arcore_device/ar_renderer.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_jni_headers",
"//base",
"//cc",
"//chrome/browser/ui:ui",
"//chrome/browser/vr:vr_base",
"//chrome/browser/vr:vr_common",
"//chrome/common:common",
"//chrome/common:constants",
"//components/omnibox/browser",
"//components/rappor",
"//components/search_engines:search_engines",
"//content/public/browser",
"//content/public/common",
"//device/gamepad",
"//device/vr",
"//device/vr/buildflags:buildflags",
"//services/device/public/mojom",
"//services/metrics/public/cpp:ukm_builders",
"//services/ws/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" ]
}
}
android_library("java") {
java_files = [
"//chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidVSyncHelper.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/EmptySniffingVrViewContainer.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/keyboard/BuildConstants.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/keyboard/GvrKeyboardLoaderClient.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/keyboard/TextEditAction.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/keyboard/VrInputMethodManagerWrapper.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/NoopCanvas.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/OnDispatchTouchEventCallback.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrAlertDialog.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrCancelAnimationActivity.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrCompositorSurfaceManager.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrCoreInfo.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrCoreVersionChecker.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrDaydreamApi.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrDelegateImpl.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrDelegateProviderImpl.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrDialog.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrDialogManager.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrFeedbackStatus.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrFirstRunActivity.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrInputConnection.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrIntentUtils.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrModalPresenter.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrPopupWindow.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrShell.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrToast.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrToastManager.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrUiWidgetFactory.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrViewContainer.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrWindowAndroid.java",
]
classpath_deps = [
"//base:base_java",
"//chrome/android:chrome_java",
"//components/policy/android:policy_java",
"//content/public/android:content_java",
"//third_party/android_tools:android_arch_lifecycle_common_java",
"//third_party/android_tools:android_arch_lifecycle_runtime_java",
"//third_party/android_tools:android_support_annotations_java",
"//third_party/android_tools:android_support_v7_appcompat_java",
"//third_party/gvr-android-keyboard:kb_java",
"//third_party/gvr-android-sdk:gvr_common_java",
"//ui/android:ui_full_java",
"//ui/android:ui_utils_java",
]
}
generate_jni("vr_jni_headers") {
sources = [
"//chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/AndroidVSyncHelper.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrCoreInfo.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrInputConnection.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrModuleProvider.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrShell.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/keyboard/GvrKeyboardLoaderClient.java",
"//chrome/android/java/src/org/chromium/chrome/browser/vr/keyboard/TextEditAction.java",
]
jni_package = "vr"
}
if (enable_arcore) {
generate_jni("ar_jni_headers") {
sources = [
"//chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java",
]
jni_package = "vr"
}
}
if (current_toolchain == default_toolchain) {
generate_jni_registration("jni_registration") {
target = ":java"
output = "$target_gen_dir/${target_name}.h"
namespace = "vr"
}
}