Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2485)

Unified Diff: device/vibration/BUILD.gn

Issue 1123283007: Merge device/vibration/android/BUILD.gn to vibration/BUILD.gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | device/vibration/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
+ }
+}
« no previous file with comments | « no previous file | device/vibration/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698