Chromium Code Reviews| Index: device/vibration/BUILD.gn |
| diff --git a/device/vibration/BUILD.gn b/device/vibration/BUILD.gn |
| index fe5a19df8f9ecc53ebe66e2601b8263ca1ae7d83..b761602102fc48043bd446f5071b766f68bd2f5c 100644 |
| --- a/device/vibration/BUILD.gn |
| +++ b/device/vibration/BUILD.gn |
| @@ -5,15 +5,21 @@ |
| import("//build/config/features.gni") |
| import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") |
| +if (is_android) { |
| + import("//build/config/android/config.gni") |
| + import("//build/config/android/rules.gni") # For generate_jni(). |
| +} |
| + |
| component("vibration") { |
| output_name = "device_vibration" |
| sources = [ |
| + "android/vibration_jni_registrar.cc", |
|
timvolodine
2015/05/14 12:16:36
looks like this is only needed for android?
scheib
2015/05/14 16:43:00
As in GYP, platform files are implicitly filtered:
scheib
2015/05/14 16:48:16
Actually, since the if (is_android) block below is
|
| + "android/vibration_jni_registrar.h", |
| "vibration_export.h", |
| "vibration_manager_impl.h", |
| "vibration_manager_impl_android.cc", |
| "vibration_manager_impl_android.h", |
| - "vibration_manager_impl_default.cc", |
| ] |
| defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ] |
| @@ -28,12 +34,9 @@ component("vibration") { |
| ] |
| if (is_android) { |
| - sources -= [ "vibration_manager_impl_default.cc" ] |
| - deps += [ |
| - "//device/vibration/android", |
| - "//device/vibration/android:vibration_jni_headers", |
| - ] |
| - allow_circular_includes_from = [ "//device/vibration/android" ] |
| + deps += [ ":vibration_jni_headers" ] |
| + } else { |
| + sources += [ "vibration_manager_impl_default.cc" ] |
|
timvolodine
2015/05/14 12:16:36
nit: no need for else if you use sources -= [ "vib
scheib
2015/05/14 16:43:00
GN style guide: List sources only once:
https://ch
|
| } |
| } |
| @@ -42,3 +45,12 @@ mojom("mojo_bindings") { |
| "vibration_manager.mojom", |
| ] |
| } |
| + |
| +if (is_android) { |
| + generate_jni("vibration_jni_headers") { |
| + sources = [ |
| + "android/java/src/org/chromium/device/vibration/VibrationProvider.java", |
| + ] |
| + jni_package = "vibration" |
| + } |
| +} |