| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") | 6 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") |
| 7 | 7 |
| 8 if (is_android) { | |
| 9 import("//build/config/android/config.gni") | |
| 10 import("//build/config/android/rules.gni") # For generate_jni(). | |
| 11 } | |
| 12 | |
| 13 component("vibration") { | 8 component("vibration") { |
| 14 output_name = "device_vibration" | 9 output_name = "device_vibration" |
| 15 | 10 |
| 16 sources = [ | 11 sources = [ |
| 17 "vibration_export.h", | 12 "vibration_export.h", |
| 18 "vibration_manager_impl.h", | 13 "vibration_manager_impl.h", |
| 14 "vibration_manager_impl_default.cc", |
| 19 ] | 15 ] |
| 20 | 16 |
| 21 defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ] | 17 defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ] |
| 22 | 18 |
| 23 deps = [ | 19 deps = [ |
| 24 ":mojo_bindings", | 20 ":mojo_bindings", |
| 25 "//base", | 21 "//base", |
| 26 "//base/third_party/dynamic_annotations", | 22 "//base/third_party/dynamic_annotations", |
| 27 "//mojo/environment:chromium", | 23 "//mojo/environment:chromium", |
| 28 "//third_party/mojo/src/mojo/public/cpp/bindings", | 24 "//third_party/mojo/src/mojo/public/cpp/bindings", |
| 29 "//third_party/mojo/src/mojo/edk/system", | 25 "//third_party/mojo/src/mojo/edk/system", |
| 30 ] | 26 ] |
| 31 | 27 |
| 32 if (is_android) { | 28 if (is_android) { |
| 33 sources += [ | 29 sources -= [ "vibration_manager_impl_default.cc" ] |
| 34 "android/vibration_jni_registrar.cc", | |
| 35 "android/vibration_jni_registrar.h", | |
| 36 "vibration_manager_impl_android.cc", | |
| 37 "vibration_manager_impl_android.h", | |
| 38 ] | |
| 39 deps += [ ":vibration_jni_headers" ] | |
| 40 } else { | |
| 41 sources += [ "vibration_manager_impl_default.cc" ] | |
| 42 } | 30 } |
| 43 } | 31 } |
| 44 | 32 |
| 45 mojom("mojo_bindings") { | 33 mojom("mojo_bindings") { |
| 46 sources = [ | 34 sources = [ |
| 47 "vibration_manager.mojom", | 35 "vibration_manager.mojom", |
| 48 ] | 36 ] |
| 49 } | 37 } |
| 50 | |
| 51 if (is_android) { | |
| 52 generate_jni("vibration_jni_headers") { | |
| 53 sources = [ | |
| 54 "android/java/src/org/chromium/device/vibration/VibrationProvider.java", | |
| 55 ] | |
| 56 jni_package = "vibration" | |
| 57 } | |
| 58 } | |
| OLD | NEW |