Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: device/bluetooth/bluetooth_device.cc

Issue 2008113002: Notify the BluetoothAdapter::Observer when a bluetooth peripheral disconnects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_device.cc
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index 7d37591f5ea21483e15af7ab315436d3e8a6e70e..4d7dc17a32be5d7c1a8de193bb1a74e325659e72 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -335,6 +335,7 @@ void BluetoothDevice::DidConnectGatt() {
}
create_gatt_connection_success_callbacks_.clear();
create_gatt_connection_error_callbacks_.clear();
+ GetAdapter()->NotifyDeviceChanged(this);
}
void BluetoothDevice::DidFailToConnectGatt(ConnectErrorCode error) {
@@ -358,6 +359,7 @@ void BluetoothDevice::DidDisconnectGatt() {
connection->InvalidateConnectionReference();
}
gatt_connections_.clear();
+ GetAdapter()->NotifyDeviceChanged(this);
}
void BluetoothDevice::AddGattConnection(BluetoothGattConnection* connection) {

Powered by Google App Engine
This is Rietveld 408576698