1# Copyright 2019 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/android/rules.gni") 6import("//build/config/locales.gni") 7import("//chrome/common/features.gni") 8import("//device/vr/buildflags/buildflags.gni") 9 10assert(enable_vr) 11 12java_strings_grd("java_strings_grd") { 13 defines = chrome_grit_defines 14 grd_file = "java/strings/android_chrome_vr_strings.grd" 15 outputs = [ "values/android_chrome_vr_strings.xml" ] + 16 process_file_template( 17 android_bundle_locales_as_resources, 18 [ "values-{{source_name_part}}/android_chrome_vr_strings.xml" ]) 19} 20 21android_resources("java_resources") { 22 sources = [ 23 "java/res/drawable-hdpi/vr_services.png", 24 "java/res/drawable-mdpi/vr_services.png", 25 "java/res/drawable-xhdpi/vr_services.png", 26 "java/res/drawable-xxhdpi/vr_services.png", 27 "java/res/drawable-xxxhdpi/vr_services.png", 28 ] 29 30 deps = [ ":java_strings_grd" ] 31 32 custom_package = "org.chromium.chrome.vr" 33} 34 35android_library("java") { 36 sources = [ 37 "java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java", 38 "java/src/org/chromium/chrome/browser/vr/AndroidVSyncHelper.java", 39 "java/src/org/chromium/chrome/browser/vr/EmptySniffingVrViewContainer.java", 40 "java/src/org/chromium/chrome/browser/vr/NoopCanvas.java", 41 "java/src/org/chromium/chrome/browser/vr/OnDispatchTouchEventCallback.java", 42 "java/src/org/chromium/chrome/browser/vr/VrAlertDialog.java", 43 "java/src/org/chromium/chrome/browser/vr/VrCancelAnimationActivity.java", 44 "java/src/org/chromium/chrome/browser/vr/VrCompositorSurfaceManager.java", 45 "java/src/org/chromium/chrome/browser/vr/VrCoreInfo.java", 46 "java/src/org/chromium/chrome/browser/vr/VrCoreVersionChecker.java", 47 "java/src/org/chromium/chrome/browser/vr/VrDaydreamApi.java", 48 "java/src/org/chromium/chrome/browser/vr/VrDelegateImpl.java", 49 "java/src/org/chromium/chrome/browser/vr/VrDelegateProviderImpl.java", 50 "java/src/org/chromium/chrome/browser/vr/VrDialog.java", 51 "java/src/org/chromium/chrome/browser/vr/VrDialogManager.java", 52 "java/src/org/chromium/chrome/browser/vr/VrFeedbackStatus.java", 53 "java/src/org/chromium/chrome/browser/vr/VrFirstRunActivity.java", 54 "java/src/org/chromium/chrome/browser/vr/VrInputConnection.java", 55 "java/src/org/chromium/chrome/browser/vr/VrIntentDelegateImpl.java", 56 "java/src/org/chromium/chrome/browser/vr/VrModalPresenter.java", 57 "java/src/org/chromium/chrome/browser/vr/VrPopupWindow.java", 58 "java/src/org/chromium/chrome/browser/vr/VrShell.java", 59 "java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java", 60 "java/src/org/chromium/chrome/browser/vr/VrToast.java", 61 "java/src/org/chromium/chrome/browser/vr/VrToastManager.java", 62 "java/src/org/chromium/chrome/browser/vr/VrUiWidgetFactory.java", 63 "java/src/org/chromium/chrome/browser/vr/VrViewContainer.java", 64 "java/src/org/chromium/chrome/browser/vr/VrWindowAndroid.java", 65 "java/src/org/chromium/chrome/browser/vr/keyboard/BuildConstants.java", 66 "java/src/org/chromium/chrome/browser/vr/keyboard/GvrKeyboardLoaderClient.java", 67 "java/src/org/chromium/chrome/browser/vr/keyboard/TextEditAction.java", 68 "java/src/org/chromium/chrome/browser/vr/keyboard/VrInputMethodManagerWrapper.java", 69 ] 70 71 deps = [ 72 ":java_resources", 73 "//base:base_java", 74 "//base:jni_java", 75 "//chrome/android:chrome_java", 76 "//chrome/browser/flags:java", 77 "//chrome/browser/preferences:java", 78 "//chrome/browser/profiles/android:java", 79 "//chrome/browser/util:java", 80 "//components/browser_ui/modaldialog/android:java", 81 "//components/embedder_support/android:content_view_java", 82 "//components/infobars/core:infobar_enums_java", 83 "//components/policy/android:policy_java", 84 "//content/public/android:content_java", 85 "//device/vr:java", 86 "//third_party/android_deps:android_support_v7_appcompat_java", 87 "//third_party/android_deps:androidx_annotation_annotation_java", 88 "//third_party/android_deps:androidx_lifecycle_lifecycle_common_java", 89 "//third_party/android_deps:androidx_lifecycle_lifecycle_runtime_java", 90 "//third_party/android_deps:androidx_lifecycle_lifecycle_viewmodel_java", 91 "//third_party/gvr-android-keyboard:kb_java", 92 "//third_party/gvr-android-sdk:gvr_common_java", 93 "//ui/android:ui_full_java", 94 "//ui/android:ui_utils_java", 95 ] 96 97 annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ] 98} 99 100generate_jni("jni_headers") { 101 sources = [ 102 "java/src/org/chromium/chrome/browser/vr/AndroidUiGestureTarget.java", 103 "java/src/org/chromium/chrome/browser/vr/AndroidVSyncHelper.java", 104 "java/src/org/chromium/chrome/browser/vr/ConsentFlowMetrics.java", 105 "java/src/org/chromium/chrome/browser/vr/VrConsentDialog.java", 106 "java/src/org/chromium/chrome/browser/vr/VrCoreInfo.java", 107 "java/src/org/chromium/chrome/browser/vr/VrInputConnection.java", 108 "java/src/org/chromium/chrome/browser/vr/VrModuleProvider.java", 109 "java/src/org/chromium/chrome/browser/vr/VrShell.java", 110 "java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java", 111 "java/src/org/chromium/chrome/browser/vr/keyboard/GvrKeyboardLoaderClient.java", 112 "java/src/org/chromium/chrome/browser/vr/keyboard/TextEditAction.java", 113 ] 114 115 if (enable_arcore) { 116 sources += 117 [ "java/src/org/chromium/chrome/browser/vr/ArConsentDialog.java" ] 118 } 119} 120