| Index: content/browser/bluetooth/web_bluetooth_service_impl.h
|
| diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h
|
| index e607e1a23bfdca7aa67bc51a107b105d38e7f54f..6e5e164b1684872e6f03e1f6741d40132cc07654 100644
|
| --- a/content/browser/bluetooth/web_bluetooth_service_impl.h
|
| +++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
|
| @@ -32,6 +32,7 @@ namespace content {
|
| class BluetoothDeviceChooserController;
|
| struct CacheQueryResult;
|
| class FrameConnectedBluetoothDevices;
|
| +struct GATTNotifySessionAndCharacteristicClient;
|
| class RenderFrameHost;
|
| class RenderProcessHost;
|
|
|
| @@ -97,12 +98,11 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
|
| const std::vector<uint8_t>& value);
|
|
|
| // WebBluetoothService methods:
|
| - void SetClient(
|
| - blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) override;
|
| void RequestDevice(blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
|
| const RequestDeviceCallback& callback) override;
|
| void RemoteServerConnect(
|
| const WebBluetoothDeviceId& device_id,
|
| + blink::mojom::WebBluetoothServerClientAssociatedPtrInfo client,
|
| const RemoteServerConnectCallback& callback) override;
|
| void RemoteServerDisconnect(const WebBluetoothDeviceId& device_id) override;
|
| void RemoteServerGetPrimaryServices(
|
| @@ -124,6 +124,7 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
|
| const RemoteCharacteristicWriteValueCallback& callback) override;
|
| void RemoteCharacteristicStartNotifications(
|
| const std::string& characteristic_instance_id,
|
| + blink::mojom::WebBluetoothCharacteristicClientAssociatedPtrInfo client,
|
| const RemoteCharacteristicStartNotificationsCallback& callback) override;
|
| void RemoteCharacteristicStopNotifications(
|
| const std::string& characteristic_instance_id,
|
| @@ -167,6 +168,7 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
|
| void OnCreateGATTConnectionSuccess(
|
| const WebBluetoothDeviceId& device_id,
|
| base::TimeTicks start_time,
|
| + blink::mojom::WebBluetoothServerClientAssociatedPtr client,
|
| const RemoteServerConnectCallback& callback,
|
| std::unique_ptr<device::BluetoothGattConnection> connection);
|
| void OnCreateGATTConnectionFailed(
|
| @@ -191,6 +193,7 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
|
|
|
| // Callbacks for BluetoothRemoteGattCharacteristic::StartNotifySession.
|
| void OnStartNotifySessionSuccess(
|
| + blink::mojom::WebBluetoothCharacteristicClientAssociatedPtr client,
|
| const RemoteCharacteristicStartNotificationsCallback& callback,
|
| std::unique_ptr<device::BluetoothGattNotifySession> notify_session);
|
| void OnStartNotifySessionFailed(
|
| @@ -272,15 +275,12 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
|
|
|
| // Map to keep track of the characteristics' notify sessions.
|
| std::unordered_map<std::string,
|
| - std::unique_ptr<device::BluetoothGattNotifySession>>
|
| + std::unique_ptr<GATTNotifySessionAndCharacteristicClient>>
|
| characteristic_id_to_notify_session_;
|
|
|
| // The RFH that owns this instance.
|
| RenderFrameHost* render_frame_host_;
|
|
|
| - // Proxy to the WebBluetoothServiceClient to send device events to.
|
| - blink::mojom::WebBluetoothServiceClientAssociatedPtr client_;
|
| -
|
| // The lifetime of this instance is exclusively managed by the RFH that
|
| // owns it so we use a "Binding" as opposed to a "StrongBinding" which deletes
|
| // the service on pipe connection errors.
|
|
|