| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 ~BluetoothDeviceAndroid() override; | 36 ~BluetoothDeviceAndroid() override; |
| 37 | 37 |
| 38 // Register C++ methods exposed to Java using JNI. | 38 // Register C++ methods exposed to Java using JNI. |
| 39 static bool RegisterJNI(JNIEnv* env); | 39 static bool RegisterJNI(JNIEnv* env); |
| 40 | 40 |
| 41 // Returns the associated ChromeBluetoothDevice Java object. | 41 // Returns the associated ChromeBluetoothDevice Java object. |
| 42 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | 42 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); |
| 43 | 43 |
| 44 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid. | 44 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid. |
| 45 BluetoothAdapterAndroid* GetAdapter() { | 45 BluetoothAdapterAndroid* GetAndroidAdapter() { |
| 46 return static_cast<BluetoothAdapterAndroid*>(adapter_); | 46 return static_cast<BluetoothAdapterAndroid*>(adapter_); |
| 47 } | 47 } |
| 48 | 48 |
| 49 // Updates cached copy of advertised UUIDs discovered during a scan. | 49 // Updates cached copy of advertised UUIDs discovered during a scan. |
| 50 // Returns true if new UUIDs differed from cached values. | 50 // Returns true if new UUIDs differed from cached values. |
| 51 bool UpdateAdvertisedUUIDs( | 51 bool UpdateAdvertisedUUIDs( |
| 52 jobject advertised_uuids); // Java Type: List<ParcelUuid> | 52 jobject advertised_uuids); // Java Type: List<ParcelUuid> |
| 53 | 53 |
| 54 // BluetoothDevice: | 54 // BluetoothDevice: |
| 55 uint32_t GetBluetoothClass() const override; | 55 uint32_t GetBluetoothClass() const override; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 base::android::ScopedJavaGlobalRef<jobject> j_device_; | 126 base::android::ScopedJavaGlobalRef<jobject> j_device_; |
| 127 | 127 |
| 128 bool gatt_connected_ = false; | 128 bool gatt_connected_ = false; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); | 130 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace device | 133 } // namespace device |
| 134 | 134 |
| 135 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ | 135 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ |
| OLD | NEW |