| 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 } |
| 11 | 11 |
| 12 component("vr") { | 12 component("vr") { |
| 13 output_name = "device_vr" | 13 output_name = "device_vr" |
| 14 | 14 |
| 15 sources = [ | 15 sources = [ |
| 16 "vr_device.cc", | 16 "vr_device.cc", |
| 17 "vr_device.h", | 17 "vr_device.h", |
| 18 "vr_device_manager.cc", | 18 "vr_device_manager.cc", |
| 19 "vr_device_manager.h", | 19 "vr_device_manager.h", |
| 20 "vr_device_provider.h", | 20 "vr_device_provider.h", |
| 21 ] | 21 ] |
| 22 | 22 |
| 23 deps = [ | 23 deps = [ |
| 24 ":mojo_bindings", |
| 24 "//base", | 25 "//base", |
| 25 "//mojo/edk/system", | 26 "//mojo/edk/system", |
| 26 "//mojo/public/cpp/bindings", | 27 "//mojo/public/cpp/bindings", |
| 27 "//third_party/WebKit/public:mojo_bindings", | 28 "//third_party/WebKit/public:mojo_bindings", |
| 28 "//ui/gfx", | 29 "//ui/gfx", |
| 29 ] | 30 ] |
| 30 | 31 |
| 31 defines = [ "DEVICE_VR_IMPLEMENTATION" ] | 32 defines = [ "DEVICE_VR_IMPLEMENTATION" ] |
| 32 | 33 |
| 33 if (is_android) { | 34 if (is_android) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 53 ] | 54 ] |
| 54 | 55 |
| 55 public_deps = [ | 56 public_deps = [ |
| 56 ":vr", | 57 ":vr", |
| 57 "//base", | 58 "//base", |
| 58 "//mojo/public/cpp/bindings", | 59 "//mojo/public/cpp/bindings", |
| 59 "//third_party/WebKit/public:mojo_bindings", | 60 "//third_party/WebKit/public:mojo_bindings", |
| 60 ] | 61 ] |
| 61 } | 62 } |
| 62 | 63 |
| 64 mojom("mojo_bindings") { |
| 65 sources = [ |
| 66 "vr_service.mojom", |
| 67 ] |
| 68 } |
| 69 |
| 63 if (is_android) { | 70 if (is_android) { |
| 64 java_sources_needing_jni = | 71 java_sources_needing_jni = |
| 65 [ "android/java/src/org/chromium/device/vr/CardboardVRDevice.java" ] | 72 [ "android/java/src/org/chromium/device/vr/CardboardVRDevice.java" ] |
| 66 | 73 |
| 67 generate_jni("jni_headers") { | 74 generate_jni("jni_headers") { |
| 68 sources = java_sources_needing_jni | 75 sources = java_sources_needing_jni |
| 69 jni_package = "vr" | 76 jni_package = "vr" |
| 70 | 77 |
| 71 public_deps = [ | 78 public_deps = [ |
| 72 "//third_party/cardboard-java:cardboard-java", | 79 "//third_party/cardboard-java:cardboard-java", |
| 73 ] | 80 ] |
| 74 } | 81 } |
| 75 | 82 |
| 76 android_library("java") { | 83 android_library("java") { |
| 77 java_files = java_sources_needing_jni | 84 java_files = java_sources_needing_jni |
| 78 deps = [ | 85 deps = [ |
| 79 "//base:base_java", | 86 "//base:base_java", |
| 80 "//third_party/cardboard-java:cardboard-java", | 87 "//third_party/cardboard-java:cardboard-java", |
| 81 ] | 88 ] |
| 82 } | 89 } |
| 83 } | 90 } |
| OLD | NEW |