| Index: device/bluetooth/device.h
|
| diff --git a/device/bluetooth/device.h b/device/bluetooth/device.h
|
| index c82439e6c283ecb6e851e466061bedf060a18420..ed9b84e3bafb1d46af7698ce9180d5ea6a97863e 100644
|
| --- a/device/bluetooth/device.h
|
| +++ b/device/bluetooth/device.h
|
| @@ -19,7 +19,7 @@ namespace bluetooth {
|
| // device/bluetooth/public/interfaces/device.mojom.
|
| // It handles requests to interact with Bluetooth Device.
|
| // Uses the platform abstraction of device/bluetooth.
|
| -class Device : public mojom::Device {
|
| +class Device : public mojom::Device, public device::BluetoothAdapter::Observer {
|
| public:
|
| Device(const std::string& address,
|
| scoped_refptr<device::BluetoothAdapter> adapter);
|
| @@ -29,8 +29,13 @@ class Device : public mojom::Device {
|
| static mojom::DeviceInfoPtr ConstructDeviceInfoStruct(
|
| const device::BluetoothDevice* device);
|
|
|
| + // device::BluetoothAdapter::Observer overrides:
|
| + void DeviceChanged(device::BluetoothAdapter* adapter,
|
| + device::BluetoothDevice* device) override;
|
| +
|
| // mojom::Device overrides:
|
| void GetInfo(const GetInfoCallback& callback) override;
|
| + void SetClient(mojom::GattClientPtr client) override;
|
|
|
| private:
|
| // The address of the Bluetooth device.
|
| @@ -39,6 +44,9 @@ class Device : public mojom::Device {
|
| // The current BluetoothAdapter.
|
| scoped_refptr<device::BluetoothAdapter> adapter_;
|
|
|
| + // The current client which listens to events from this device.
|
| + mojom::GattClientPtr client_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Device);
|
| };
|
|
|
|
|