| Index: device/bluetooth/bluez/bluetooth_device_bluez.h
|
| diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.h b/device/bluetooth/bluez/bluetooth_device_bluez.h
|
| index 293c2466b6dafe10bbf817fd9160660f3b179563..a7576a580e17d23196eee9f29dacee39d57b8d29 100644
|
| --- a/device/bluetooth/bluez/bluetooth_device_bluez.h
|
| +++ b/device/bluetooth/bluez/bluetooth_device_bluez.h
|
| @@ -38,6 +38,7 @@ class BluetoothPairingBlueZ;
|
| // thread.
|
| class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
|
| : public device::BluetoothDevice,
|
| + public bluez::BluetoothDeviceClient::Observer,
|
| public bluez::BluetoothGattServiceClient::Observer {
|
| public:
|
| // BluetoothDevice override
|
| @@ -124,10 +125,19 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
|
| scoped_refptr<device::BluetoothSocketThread> socket_thread);
|
| ~BluetoothDeviceBlueZ() override;
|
|
|
| - // bluez::BluetoothGattServiceClient::Observer overrides.
|
| + // bluez::BluetoothDeviceClient::Observer overrides
|
| + void DevicePropertyChanged(const dbus::ObjectPath& object_path,
|
| + const std::string& property_name) override;
|
| +
|
| + // bluez::BluetoothGattServiceClient::Observer overrides
|
| void GattServiceAdded(const dbus::ObjectPath& object_path) override;
|
| void GattServiceRemoved(const dbus::ObjectPath& object_path) override;
|
|
|
| + // Called by the constructor to initialize the map of GATT services associated
|
| + // with this device and to invoke NotifyGattDiscoveryComplete() with each
|
| + // cached service.
|
| + void InitializeGattServiceMap();
|
| +
|
| // Called by dbus:: on completion of the D-Bus method call to get the
|
| // connection attributes of the current connection to the device.
|
| void OnGetConnInfo(const ConnectionInfoCallback& callback,
|
| @@ -206,6 +216,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
|
| scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
|
| scoped_refptr<device::BluetoothSocketThread> socket_thread_;
|
|
|
| + // This vector temporarily caches the newly added services for later
|
| + // notification of discovery complete. Once DevicePropertyChange is invoked
|
| + // with a toggle of ServicesResolved property, the
|
| + // NotifyGattDiscoveryComplete() will be called with each service once.
|
| + std::vector<device::BluetoothRemoteGattService*>
|
| + newly_discovered_gatt_services_;
|
| +
|
| // During pairing this is set to an object that we don't own, but on which
|
| // we can make method calls to request, display or confirm PIN Codes and
|
| // Passkeys. Generally it is the object that owns this one.
|
|
|