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

Unified Diff: device/bluetooth/bluetooth_adapter.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: Improve DeviceChanged comment and add a dedicated test. 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_adapter.cc
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc
index 6153a12d05a53fd9d1da2685feeac66c63c8c6f2..210eadbe35e77cc7fe4c53ea141666f67b7ce892 100644
--- a/device/bluetooth/bluetooth_adapter.cc
+++ b/device/bluetooth/bluetooth_adapter.cc
@@ -164,6 +164,14 @@ void BluetoothAdapter::NotifyAdapterStateChanged(bool powered) {
AdapterPoweredChanged(this, powered));
}
+void BluetoothAdapter::NotifyDeviceChanged(BluetoothDevice* device) {
+ DCHECK(device);
+ DCHECK_EQ(device->GetAdapter(), this);
+
+ FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
+ DeviceChanged(this, device));
+}
+
#if defined(OS_CHROMEOS) || defined(OS_LINUX)
void BluetoothAdapter::NotifyDevicePairedChanged(BluetoothDevice* device,
bool new_paired_status) {

Powered by Google App Engine
This is Rietveld 408576698