| Index: content/renderer/bluetooth/web_bluetooth_impl.h
|
| diff --git a/content/renderer/bluetooth/web_bluetooth_impl.h b/content/renderer/bluetooth/web_bluetooth_impl.h
|
| index 193b76bf25dc8a7a34e3ac5fa5411c309d4b6d3c..fae4ad485ee28a85710b1c6266d444a54161a059 100644
|
| --- a/content/renderer/bluetooth/web_bluetooth_impl.h
|
| +++ b/content/renderer/bluetooth/web_bluetooth_impl.h
|
| @@ -48,6 +48,7 @@ class CONTENT_EXPORT WebBluetoothImpl
|
| blink::WebBluetoothRequestDeviceCallbacks* callbacks) override;
|
| void connect(
|
| const blink::WebString& device_id,
|
| + blink::WebBluetoothDevice* device,
|
| blink::WebBluetoothRemoteGATTServerConnectCallbacks* callbacks) override;
|
| void disconnect(const blink::WebString& device_id) override;
|
| void getPrimaryService(
|
| @@ -83,6 +84,7 @@ class CONTENT_EXPORT WebBluetoothImpl
|
| void RemoteCharacteristicValueChanged(
|
| const mojo::String& characteristic_instance_id,
|
| mojo::Array<uint8_t> value) override;
|
| + void GattServerDisconnected(const mojo::String& device_id) override;
|
|
|
| // Callbacks for WebBluetoothService calls:
|
| void OnConnectComplete(
|
| @@ -131,6 +133,12 @@ class CONTENT_EXPORT WebBluetoothImpl
|
| std::unordered_map<std::string, blink::WebBluetoothRemoteGATTCharacteristic*>
|
| active_characteristics_;
|
|
|
| + // Map of device_ids to WebBluetoothDevices. Added in connect() and removed in
|
| + // disconnect(). This means a device may not actually be connected while in
|
| + // this map, but that it will definitely be removed when the page navigates.
|
| + std::unordered_map<std::string, blink::WebBluetoothDevice*>
|
| + connected_devices_;
|
| +
|
| // Binding associated with |web_bluetooth_service_|.
|
| mojo::AssociatedBinding<blink::mojom::WebBluetoothServiceClient> binding_;
|
|
|
|
|