# Copyright 2019 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("//build/config/locales.gni") import("//chrome/common/features.gni") import("//device/vr/buildflags/buildflags.gni") import("//tools/grit/grit_rule.gni") assert(enable_vr) java_strings_grd("java_strings_grd") { defines = chrome_grit_defines grd_file = "java/strings/android_chrome_vr_strings.grd" outputs = [ "values/android_chrome_vr_strings.xml" ] + process_file_template( android_bundle_locales_as_resources, [ "values-{{source_name_part}}/android_chrome_vr_strings.xml" ]) } android_resources("java_resources") { sources = [ "java/res/drawable-hdpi/vr_services.png", "java/res/drawable-mdpi/vr_services.png", "java/res/drawable-xhdpi/vr_services.png", "java/res/drawable-xxhdpi/vr_services.png", "java/res/drawable-xxxhdpi/vr_services.png", ] deps = [ ":java_strings_grd" ] } android_library("java") { sources = [ "java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java", "java/src/org/chromium/chrome/browser/vr/AndroidVSyncHelper.java", "java/src/org/chromium/chrome/browser/vr/EmptySniffingVrViewContainer.java", "java/src/org/chromium/chrome/browser/vr/NoopCanvas.java", "java/src/org/chromium/chrome/browser/vr/OnDispatchTouchEventCallback.java", "java/src/org/chromium/chrome/browser/vr/VrAlertDialog.java", "java/src/org/chromium/chrome/browser/vr/VrCancelAnimationActivity.java", "java/src/org/chromium/chrome/browser/vr/VrCompositorSurfaceManager.java", "java/src/org/chromium/chrome/browser/vr/VrCoreInstallUtils.java", "java/src/org/chromium/chrome/browser/vr/VrCoreVersionChecker.java", "java/src/org/chromium/chrome/browser/vr/VrDaydreamApi.java", "java/src/org/chromium/chrome/browser/vr/VrDelegateImpl.java", "java/src/org/chromium/chrome/browser/vr/VrDelegateProviderImpl.java", "java/src/org/chromium/chrome/browser/vr/VrDialog.java", "java/src/org/chromium/chrome/browser/vr/VrDialogManager.java", "java/src/org/chromium/chrome/browser/vr/VrFeedbackStatus.java", "java/src/org/chromium/chrome/browser/vr/VrFirstRunActivity.java", "java/src/org/chromium/chrome/browser/vr/VrInputConnection.java", "java/src/org/chromium/chrome/browser/vr/VrIntentDelegateImpl.java", "java/src/org/chromium/chrome/browser/vr/VrModalPresenter.java", "java/src/org/chromium/chrome/browser/vr/VrPopupWindow.java", "java/src/org/chromium/chrome/browser/vr/VrShell.java", "java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java", "java/src/org/chromium/chrome/browser/vr/VrToast.java", "java/src/org/chromium/chrome/browser/vr/VrToastManager.java", "java/src/org/chromium/chrome/browser/vr/VrUiWidgetFactory.java", "java/src/org/chromium/chrome/browser/vr/VrViewContainer.java", "java/src/org/chromium/chrome/browser/vr/VrWindowAndroid.java", "java/src/org/chromium/chrome/browser/vr/keyboard/BuildConstants.java", "java/src/org/chromium/chrome/browser/vr/keyboard/GvrKeyboardLoaderClient.java", "java/src/org/chromium/chrome/browser/vr/keyboard/TextEditAction.java", "java/src/org/chromium/chrome/browser/vr/keyboard/VrInputMethodManagerWrapper.java", ] deps = [ ":java_resources", "//base:base_java", "//base:jni_java", "//chrome/android:chrome_java", "//chrome/browser/feedback/android:java", "//chrome/browser/flags:java", "//chrome/browser/fullscreen/android:java", "//chrome/browser/preferences:java", "//chrome/browser/profiles/android:java", "//chrome/browser/tab:java", "//chrome/browser/tabmodel:java", "//chrome/browser/ui/messages/android:java", "//chrome/browser/util:java", "//components/browser_ui/modaldialog/android:java", "//components/browser_ui/notifications/android:java", "//components/embedder_support/android:content_view_java", "//components/external_intents/android:java", "//components/infobars/core:infobar_enums_java", "//components/page_info/android:java", "//components/policy/android:policy_java", "//content/public/android:content_java", "//device/vr:java", "//third_party/android_deps:android_support_v7_appcompat_java", "//third_party/android_deps:androidx_annotation_annotation_java", "//third_party/android_deps:androidx_lifecycle_lifecycle_common_java", "//third_party/android_deps:androidx_lifecycle_lifecycle_runtime_java", "//third_party/android_deps:androidx_lifecycle_lifecycle_viewmodel_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", ] annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] resources_package = "org.chromium.chrome.vr" } generate_jni("jni_headers") { sources = [ "java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java", "java/src/org/chromium/chrome/browser/vr/AndroidVSyncHelper.java", "java/src/org/chromium/chrome/browser/vr/VrCoreInstallUtils.java", "java/src/org/chromium/chrome/browser/vr/VrInputConnection.java", "java/src/org/chromium/chrome/browser/vr/VrModuleProvider.java", "java/src/org/chromium/chrome/browser/vr/VrShell.java", "java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java", "java/src/org/chromium/chrome/browser/vr/keyboard/GvrKeyboardLoaderClient.java", "java/src/org/chromium/chrome/browser/vr/keyboard/TextEditAction.java", ] }