| 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 <memory> | 10 #include <memory> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static bool RegisterJNI(JNIEnv* env); | 42 static bool RegisterJNI(JNIEnv* env); |
| 43 | 43 |
| 44 // Returns the associated ChromeBluetoothDevice Java object. | 44 // Returns the associated ChromeBluetoothDevice Java object. |
| 45 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | 45 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); |
| 46 | 46 |
| 47 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid. | 47 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid. |
| 48 BluetoothAdapterAndroid* GetAndroidAdapter() { | 48 BluetoothAdapterAndroid* GetAndroidAdapter() { |
| 49 return static_cast<BluetoothAdapterAndroid*>(adapter_); | 49 return static_cast<BluetoothAdapterAndroid*>(adapter_); |
| 50 } | 50 } |
| 51 | 51 |
| 52 // Replaces cached copy of advertised UUIDs discovered during a scan. | |
| 53 void UpdateAdvertisedUUIDs( | |
| 54 jobjectArray advertised_uuids); // Java Type: String[] | |
| 55 | |
| 56 // BluetoothDevice: | 52 // BluetoothDevice: |
| 57 uint32_t GetBluetoothClass() const override; | 53 uint32_t GetBluetoothClass() const override; |
| 58 std::string GetAddress() const override; | 54 std::string GetAddress() const override; |
| 59 VendorIDSource GetVendorIDSource() const override; | 55 VendorIDSource GetVendorIDSource() const override; |
| 60 uint16_t GetVendorID() const override; | 56 uint16_t GetVendorID() const override; |
| 61 uint16_t GetProductID() const override; | 57 uint16_t GetProductID() const override; |
| 62 uint16_t GetDeviceID() const override; | 58 uint16_t GetDeviceID() const override; |
| 63 uint16_t GetAppearance() const override; | 59 uint16_t GetAppearance() const override; |
| 64 base::Optional<std::string> GetName() const override; | 60 base::Optional<std::string> GetName() const override; |
| 65 bool IsPaired() const override; | 61 bool IsPaired() const override; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 base::android::ScopedJavaGlobalRef<jobject> j_device_; | 124 base::android::ScopedJavaGlobalRef<jobject> j_device_; |
| 129 | 125 |
| 130 bool gatt_connected_ = false; | 126 bool gatt_connected_ = false; |
| 131 | 127 |
| 132 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); | 128 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); |
| 133 }; | 129 }; |
| 134 | 130 |
| 135 } // namespace device | 131 } // namespace device |
| 136 | 132 |
| 137 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ | 133 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ |
| OLD | NEW |