| 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 if (current_cpu == "arm" || current_cpu == "arm64") { |
| 13 output_name = "device_vr" | 13 component("vr") { |
| 14 output_name = "device_vr" |
| 14 | 15 |
| 15 sources = [ | 16 sources = [ |
| 16 "vr_client_dispatcher.h", | 17 "vr_client_dispatcher.h", |
| 17 "vr_device.cc", | 18 "vr_device.cc", |
| 18 "vr_device.h", | 19 "vr_device.h", |
| 19 "vr_device_manager.cc", | 20 "vr_device_manager.cc", |
| 20 "vr_device_manager.h", | 21 "vr_device_manager.h", |
| 21 "vr_device_provider.h", | 22 "vr_device_provider.h", |
| 22 "vr_service_impl.cc", | 23 "vr_service_impl.cc", |
| 23 "vr_service_impl.h", | 24 "vr_service_impl.h", |
| 24 ] | |
| 25 | |
| 26 deps = [ | |
| 27 ":mojo_bindings", | |
| 28 "//base", | |
| 29 "//mojo/public/cpp/bindings", | |
| 30 "//ui/gfx", | |
| 31 ] | |
| 32 | |
| 33 defines = [ "DEVICE_VR_IMPLEMENTATION" ] | |
| 34 | |
| 35 if (is_android) { | |
| 36 sources += [ | |
| 37 "android/gvr/gvr_delegate.cc", | |
| 38 "android/gvr/gvr_delegate.h", | |
| 39 "android/gvr/gvr_device.cc", | |
| 40 "android/gvr/gvr_device.h", | |
| 41 "android/gvr/gvr_device_provider.cc", | |
| 42 "android/gvr/gvr_device_provider.h", | |
| 43 "android/gvr/gvr_gamepad_data_fetcher.cc", | |
| 44 "android/gvr/gvr_gamepad_data_fetcher.h", | |
| 45 ] | 25 ] |
| 46 | 26 |
| 47 deps += [ | 27 deps = [ |
| 48 "//device/gamepad", | 28 ":mojo_bindings", |
| 49 "//third_party/WebKit/public:blink_headers", | 29 "//base", |
| 50 "//third_party/gvr-android-sdk:libgvr", | 30 "//mojo/public/cpp/bindings", |
| 31 "//ui/gfx", |
| 51 ] | 32 ] |
| 52 configs += [ "//third_party/gvr-android-sdk:libgvr_config" ] | 33 |
| 34 defines = [ "DEVICE_VR_IMPLEMENTATION" ] |
| 35 |
| 36 if (is_android) { |
| 37 sources += [ |
| 38 "android/gvr/gvr_delegate.cc", |
| 39 "android/gvr/gvr_delegate.h", |
| 40 "android/gvr/gvr_device.cc", |
| 41 "android/gvr/gvr_device.h", |
| 42 "android/gvr/gvr_device_provider.cc", |
| 43 "android/gvr/gvr_device_provider.h", |
| 44 "android/gvr/gvr_gamepad_data_fetcher.cc", |
| 45 "android/gvr/gvr_gamepad_data_fetcher.h", |
| 46 ] |
| 47 |
| 48 deps += [ |
| 49 "//device/gamepad", |
| 50 "//third_party/WebKit/public:blink_headers", |
| 51 ] |
| 52 ldflags = [ "-landroid" ] |
| 53 libs = [ "//third_party/gvr-android-sdk/libgvr_shim_static_${current_cpu}.
a" ] |
| 54 configs += [ "//third_party/gvr-android-sdk:libgvr_config" ] |
| 55 } |
| 56 } |
| 57 |
| 58 static_library("fakes") { |
| 59 testonly = true |
| 60 |
| 61 sources = [ |
| 62 "test/fake_vr_device.cc", |
| 63 "test/fake_vr_device.h", |
| 64 "test/fake_vr_device_provider.cc", |
| 65 "test/fake_vr_device_provider.h", |
| 66 ] |
| 67 |
| 68 public_deps = [ |
| 69 ":mojo_bindings", |
| 70 ":vr", |
| 71 "//base", |
| 72 "//mojo/public/cpp/bindings", |
| 73 ] |
| 53 } | 74 } |
| 54 } | 75 } |
| 55 | 76 |
| 56 static_library("fakes") { | |
| 57 testonly = true | |
| 58 | |
| 59 sources = [ | |
| 60 "test/fake_vr_device.cc", | |
| 61 "test/fake_vr_device.h", | |
| 62 "test/fake_vr_device_provider.cc", | |
| 63 "test/fake_vr_device_provider.h", | |
| 64 ] | |
| 65 | |
| 66 public_deps = [ | |
| 67 ":mojo_bindings", | |
| 68 ":vr", | |
| 69 "//base", | |
| 70 "//mojo/public/cpp/bindings", | |
| 71 ] | |
| 72 } | |
| 73 | |
| 74 mojom("mojo_bindings") { | 77 mojom("mojo_bindings") { |
| 75 sources = [ | 78 sources = [ |
| 76 "vr_service.mojom", | 79 "vr_service.mojom", |
| 77 ] | 80 ] |
| 78 | 81 |
| 79 use_new_wrapper_types = false | 82 use_new_wrapper_types = false |
| 80 } | 83 } |
| OLD | NEW |