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

Unified Diff: device/bluetooth/BUILD.gn

Issue 1119113002: bluetooth: Initial JNI setup for device/bluetooth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Additional comment on RegisterBluetoothJni 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 | « content/content_browser.gypi ('k') | device/bluetooth/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/BUILD.gn
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
index 04f46ae71e739f5a42985ed2ca8035bec920f4d8..3de71320584d768944bddf11e9c811681e1d7760 100644
--- a/device/bluetooth/BUILD.gn
+++ b/device/bluetooth/BUILD.gn
@@ -4,6 +4,10 @@
import("//tools/grit/grit_rule.gni")
+if (is_android) {
+ import("//build/config/android/rules.gni") # For generate_jni().
+}
+
config("bluetooth_config") {
if (is_win) {
ldflags = [
@@ -19,6 +23,8 @@ config("bluetooth_config") {
component("bluetooth") {
sources = [
+ "android/bluetooth_jni_registrar.cc",
+ "android/bluetooth_jni_registrar.h",
"bluetooth_adapter.cc",
"bluetooth_adapter.h",
"bluetooth_adapter_android.cc",
@@ -123,9 +129,11 @@ component("bluetooth") {
"//ui/base",
]
- if (is_win) {
- libs = [ "setupapi.lib" ]
- } else if (is_chromeos) {
+ if (is_android) {
+ deps += [ ":bluetooth_jni" ]
+ }
+
+ if (is_chromeos) {
deps += [
"//chromeos",
"//dbus",
@@ -135,6 +143,10 @@ component("bluetooth") {
if (is_mac) {
libs = [ "IOBluetooth.framework" ]
}
+
+ if (is_win) {
+ libs = [ "setupapi.lib" ]
+ }
}
grit("strings") {
@@ -228,3 +240,12 @@ static_library("mocks") {
"//testing/gmock",
]
}
+
+if (is_android) {
+ generate_jni("bluetooth_jni") {
+ sources = [
+ "android/java/src/org/chromium/device/bluetooth/BluetoothAdapter.java",
+ ]
+ jni_package = "bluetooth"
+ }
+}
« no previous file with comments | « content/content_browser.gypi ('k') | device/bluetooth/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698