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

Unified Diff: device/bluetooth/bluetooth_adapter.h

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: More tests, and fixing ortuno's comments Created 4 years, 1 month 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.h
diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h
index ea2b48c8efeb12053356766e9bcfe88f0d3a201f..216fc073f2adcb937239fb84f13365d7f97d6d15 100644
--- a/device/bluetooth/bluetooth_adapter.h
+++ b/device/bluetooth/bluetooth_adapter.h
@@ -11,6 +11,7 @@
#include <memory>
#include <set>
#include <string>
+#include <unordered_map>
#include <utility>
#include <vector>
@@ -317,6 +318,16 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapter
// Indicates whether the adapter is currently discovering new devices.
virtual bool IsDiscovering() const = 0;
+ // Inserts all the devices that are connected by the operating system, and not
+ // being connected by Chromium, into |devices_|. This method is useful since
+ // a discovery session cannot find devices that are already connected to the
+ // computer.
+ // TODO(crbug.com/653032): Needs to be implemented for Android, ChromeOS and
+ // Windows.
+ virtual std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet>
+ RetrieveGattConnectedDevicesWithDiscoveryFilter(
+ const BluetoothDiscoveryFilter& discovery_filter);
+
// Requests the adapter to start a new discovery session. On success, a new
// instance of BluetoothDiscoverySession will be returned to the caller via
// |callback| and the adapter will be discovering nearby Bluetooth devices.
@@ -351,8 +362,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapter
BluetoothDiscoveryFilter* masked_filter) const;
// Requests the list of devices from the adapter. All devices are returned,
- // including those currently connected and those paired. Use the returned
- // device pointers to determine which they are.
+ // including those currently connected, those paired and all devices returned
+ // by RetrieveGattConnectedDevicesWithDiscoveryFilter() (from the previous
+ // call). Use the returned device pointers to determine which they are.
virtual DeviceList GetDevices();
virtual ConstDeviceList GetDevices() const;

Powered by Google App Engine
This is Rietveld 408576698