Index: device/bluetooth/bluetooth_adapter_android.h |
diff --git a/device/bluetooth/bluetooth_adapter_android.h b/device/bluetooth/bluetooth_adapter_android.h |
index c2b662cfdca5b7c747aaf55f825dcb9cc7403dd0..cfb9d31733b719f3815ae49a561df2dbbbfb9f41 100644 |
--- a/device/bluetooth/bluetooth_adapter_android.h |
+++ b/device/bluetooth/bluetooth_adapter_android.h |
@@ -5,6 +5,7 @@ |
#ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
#define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ |
+#include "base/android/jni_android.h" |
#include "base/memory/weak_ptr.h" |
#include "device/bluetooth/bluetooth_adapter.h" |
@@ -19,7 +20,14 @@ namespace device { |
class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final |
: public BluetoothAdapter { |
public: |
- static base::WeakPtr<BluetoothAdapter> CreateAdapter(); |
+ // Create a BluetoothAdapterAndroid instance. |
+ static base::WeakPtr<BluetoothAdapterAndroid> CreateAdapter(); |
+ |
+ // Register C++ methods exposed to Java using JNI. |
+ static bool RegisterJNI(JNIEnv* env); |
+ |
+ // True if this app has android permissions necessary for Bluetooth. |
+ bool HasBluetoothPermission() const; |
// BluetoothAdapter: |
std::string GetAddress() const override; |
@@ -74,6 +82,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final |
void RemovePairingDelegateInternal( |
BluetoothDevice::PairingDelegate* pairing_delegate) override; |
+ // Java object org.chromium.device.bluetooth.BluetoothAdapter. |
+ base::android::ScopedJavaGlobalRef<jobject> j_bluetooth_adapter_; |
+ |
std::string address_; |
std::string name_; |