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

Unified Diff: device/bluetooth/bluetooth_adapter.h

Issue 1057603004: bluetooth: Refactor (Add|Remove)Observer impls into BluetoothAdapter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-style-guide-ordering-
Patch Set: Merge TOT Created 5 years, 8 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter.h
diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h
index e2ebf48eb3a974beb6f7094384fb1743282e3c5f..4841048a35c4a324298565c849dc3b9676cbc35a 100644
--- a/device/bluetooth/bluetooth_adapter.h
+++ b/device/bluetooth/bluetooth_adapter.h
@@ -215,9 +215,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapter
// Adds and removes observers for events on this bluetooth adapter. If
// monitoring multiple adapters, check the |adapter| parameter of observer
// methods to determine which adapter is issuing the event.
- virtual void AddObserver(BluetoothAdapter::Observer* observer) = 0;
- virtual void RemoveObserver(
- BluetoothAdapter::Observer* observer) = 0;
+ virtual void AddObserver(BluetoothAdapter::Observer* observer);
+ virtual void RemoveObserver(BluetoothAdapter::Observer* observer);
// The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX",
// where each XX is a hexadecimal number.
@@ -454,6 +453,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapter
void DiscoverySessionBecameInactive(
BluetoothDiscoverySession* discovery_session);
+ // Observers of BluetoothAdapter, notified from implementation subclasses.
+ ObserverList<device::BluetoothAdapter::Observer> observers_;
+
// Devices paired with, connected to, discovered by, or visible to the
// adapter. The key is the Bluetooth address of the device and the value is
// the BluetoothDevice object whose lifetime is managed by the adapter
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698