| Index: device/bluetooth/bluetooth_device.h
|
| diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
|
| index 1dc6bcd658d6c8f8aaccd556da6cea8673ef76c7..5f3b37e3bef42f4900dd8d58334cf9cc3c97fc22 100644
|
| --- a/device/bluetooth/bluetooth_device.h
|
| +++ b/device/bluetooth/bluetooth_device.h
|
| @@ -238,6 +238,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
|
| virtual uint16_t GetAppearance() const = 0;
|
|
|
| // Returns the name of the device, which may be empty.
|
| + //
|
| + // On Android: If the device is connected we retrieve the name from the system
|
| + // but if the device is not connected we use the name in the last advertising
|
| + // packet. We do this because the function to retrieve the name takes several
|
| + // ms on Android.
|
| virtual base::Optional<std::string> GetName() const = 0;
|
|
|
| // Returns the name of the device suitable for displaying, this may
|
| @@ -549,6 +554,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
|
| // Called by BluetoothAdapter when a new Advertisement is seen for this
|
| // device. This replaces previously seen Advertisement Data.
|
| void UpdateAdvertisementData(int8_t rssi,
|
| + const std::string* advertised_name,
|
| UUIDList advertised_uuids,
|
| ServiceDataMap service_data,
|
| const int8_t* tx_power);
|
| @@ -649,6 +655,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
|
| // BluetoothGattConnection objects keeping the GATT connection alive.
|
| std::set<BluetoothGattConnection*> gatt_connections_;
|
|
|
| + base::Optional<std::string> advertised_name_;
|
| +
|
| GattServiceMap gatt_services_;
|
| bool gatt_services_discovery_complete_;
|
|
|
|
|