Index: chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc |
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc |
index bd7bec3e5f5ac6eb83f1079d719e8f44b3020fd8..4d11779c6a0092a7403b9cbc798dcc9e5bc9dafc 100644 |
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc |
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc |
@@ -112,6 +112,18 @@ void BluetoothDeviceToApiDevice(const device::BluetoothDevice& device, |
out->paired.reset(new bool(device.IsPaired())); |
out->connected.reset(new bool(device.IsConnected())); |
+ if (*out->connected) { |
+ int rssi = device.GetRSSI(); |
keybuk
2014/04/27 09:08:44
RSSI can also be provided when not connected - e.g
Ilya Sherman
2014/04/29 00:51:17
I extended the IDL documentation to specify this,
|
+ if (rssi != BluetoothDevice::kUnknownPower) |
+ out->rssi.reset(new int(rssi)); |
+ int current_transmit_power = device.GetCurrentHostTransmitPower(); |
+ if (current_transmit_power != BluetoothDevice::kUnknownPower) |
+ out->current_host_transmit_power.reset(new int(current_transmit_power)); |
+ int maximum_transmit_power = device.GetMaximumHostTransmitPower(); |
+ if (maximum_transmit_power != BluetoothDevice::kUnknownPower) |
+ out->maximum_host_transmit_power.reset(new int(maximum_transmit_power)); |
keybuk
2014/04/27 09:08:44
These on the other hand only make sense when conne
Ilya Sherman
2014/04/29 00:51:17
Ack.
|
+ } |
+ |
std::vector<std::string>* string_uuids = new std::vector<std::string>(); |
const device::BluetoothDevice::UUIDList& uuids = device.GetUUIDs(); |
for (device::BluetoothDevice::UUIDList::const_iterator iter = uuids.begin(); |