| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//mojo/public/tools/bindings/mojom.gni") | 6 import("//mojo/public/tools/bindings/mojom.gni") |
| 7 | 7 |
| 8 if (is_android) { | 8 if (is_android) { |
| 9 import("//build/config/android/rules.gni") # For generate_jni(). | 9 import("//build/config/android/rules.gni") # For generate_jni(). |
| 10 } | 10 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 ":mojo_bindings", | 27 ":mojo_bindings", |
| 28 "//base", | 28 "//base", |
| 29 "//mojo/public/cpp/bindings", | 29 "//mojo/public/cpp/bindings", |
| 30 "//ui/gfx", | 30 "//ui/gfx", |
| 31 ] | 31 ] |
| 32 | 32 |
| 33 defines = [ "DEVICE_VR_IMPLEMENTATION" ] | 33 defines = [ "DEVICE_VR_IMPLEMENTATION" ] |
| 34 | 34 |
| 35 if (is_android) { | 35 if (is_android) { |
| 36 sources += [ | 36 sources += [ |
| 37 "android/cardboard/cardboard_vr_device.cc", | 37 "android/gvr/gvr_api_manager.cc", |
| 38 "android/cardboard/cardboard_vr_device.h", | 38 "android/gvr/gvr_api_manager.h", |
| 39 "android/cardboard/cardboard_vr_device_provider.cc", | 39 "android/gvr/gvr_device.cc", |
| 40 "android/cardboard/cardboard_vr_device_provider.h", | 40 "android/gvr/gvr_device.h", |
| 41 "android/gvr/gvr_device_provider.cc", |
| 42 "android/gvr/gvr_device_provider.h", |
| 41 ] | 43 ] |
| 42 | 44 |
| 43 deps += [ ":jni_headers" ] | 45 deps += [ |
| 46 ":jni_headers", |
| 47 "//third_party/gvr-android-sdk:libgvr", |
| 48 ] |
| 49 configs += [ "//third_party/gvr-android-sdk:libgvr_config" ] |
| 44 } | 50 } |
| 45 } | 51 } |
| 46 | 52 |
| 47 static_library("fakes") { | 53 static_library("fakes") { |
| 48 testonly = true | 54 testonly = true |
| 49 | 55 |
| 50 sources = [ | 56 sources = [ |
| 51 "test/fake_vr_device.cc", | 57 "test/fake_vr_device.cc", |
| 52 "test/fake_vr_device.h", | 58 "test/fake_vr_device.h", |
| 53 "test/fake_vr_device_provider.cc", | 59 "test/fake_vr_device_provider.cc", |
| 54 "test/fake_vr_device_provider.h", | 60 "test/fake_vr_device_provider.h", |
| 55 ] | 61 ] |
| 56 | 62 |
| 57 public_deps = [ | 63 public_deps = [ |
| 64 ":mojo_bindings", |
| 58 ":vr", | 65 ":vr", |
| 59 "//base", | 66 "//base", |
| 60 "//mojo/public/cpp/bindings", | 67 "//mojo/public/cpp/bindings", |
| 61 ] | 68 ] |
| 62 } | 69 } |
| 63 | 70 |
| 64 mojom("mojo_bindings") { | 71 mojom("mojo_bindings") { |
| 65 sources = [ | 72 sources = [ |
| 66 "vr_service.mojom", | 73 "vr_service.mojom", |
| 67 ] | 74 ] |
| 68 | 75 |
| 69 use_new_wrapper_types = false | 76 use_new_wrapper_types = false |
| 70 } | 77 } |
| 71 | 78 |
| 72 if (is_android) { | 79 if (is_android) { |
| 73 java_sources_needing_jni = | 80 java_sources_needing_jni = |
| 74 [ "android/java/src/org/chromium/device/vr/CardboardVRDevice.java" ] | 81 [ "android/java/src/org/chromium/device/vr/GvrDeviceProvider.java" ] |
| 75 | 82 |
| 76 generate_jni("jni_headers") { | 83 generate_jni("jni_headers") { |
| 77 sources = java_sources_needing_jni | 84 sources = java_sources_needing_jni |
| 78 jni_package = "vr" | 85 jni_package = "vr" |
| 79 } | 86 } |
| 80 | 87 |
| 81 android_library("java") { | 88 android_library("java") { |
| 82 java_files = java_sources_needing_jni | 89 java_files = java_sources_needing_jni |
| 83 deps = [ | 90 deps = [ |
| 84 "//base:base_java", | 91 "//base:base_java", |
| 85 "//third_party/cardboard-java:cardboard-java", | 92 "//third_party/android_protobuf:protobuf_nano_javalib", |
| 93 "//third_party/gvr-android-sdk:gvr_common_java", |
| 86 ] | 94 ] |
| 87 } | 95 } |
| 88 } | 96 } |
| OLD | NEW |