| Index: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h
|
| diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h
|
| index 99c3efaf4dd9cce53d1c95f1a4cb91374576e00b..5a525df3423d4e302b75da2b3904c7d8528edf5a 100644
|
| --- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h
|
| +++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h
|
| @@ -9,7 +9,7 @@
|
| #include "bindings/modules/v8/StringOrUnsignedLong.h"
|
| #include "core/dom/ContextLifecycleObserver.h"
|
| #include "modules/bluetooth/BluetoothDevice.h"
|
| -#include "mojo/public/cpp/bindings/associated_binding_set.h"
|
| +#include "mojo/public/cpp/bindings/associated_binding.h"
|
| #include "platform/heap/Heap.h"
|
| #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
|
| #include "wtf/text/WTFString.h"
|
| @@ -59,17 +59,11 @@ class BluetoothRemoteGATTServer
|
| // Removes all ScriptPromiseResolvers from the set of Active Algorithms.
|
| void ClearActiveAlgorithms() { m_activeAlgorithms.clear(); }
|
|
|
| - // If gatt is connected then sets gatt.connected to false and disconnects.
|
| - // This function only performs the necessary steps to ensure a device
|
| - // disconnects therefore it should only be used when the object is being
|
| - // garbage collected or the context is being destroyed.
|
| - void DisconnectIfConnected();
|
| + // Performs necessary cleanup when a device disconnects. If |dispatchEvent|
|
| + // is true, dispatch a gattserverdisconnected event.
|
| + void CleanupDisconnectedDevice(bool dispatchEvent);
|
|
|
| - // Performs necessary cleanup when a device disconnects and fires
|
| - // gattserverdisconnected event.
|
| - void CleanupDisconnectedDeviceAndFireEvent();
|
| -
|
| - void DispatchDisconnected();
|
| + void HandleClientConnectionError();
|
|
|
| // USING_PRE_FINALIZER interface.
|
| // Called before the object gets garbage collected.
|
| @@ -111,8 +105,8 @@ class BluetoothRemoteGATTServer
|
| // using this server’s connection.
|
| HeapHashSet<Member<ScriptPromiseResolver>> m_activeAlgorithms;
|
|
|
| - mojo::AssociatedBindingSet<mojom::blink::WebBluetoothServerClient>
|
| - m_clientBindings;
|
| + mojo::AssociatedBinding<mojom::blink::WebBluetoothServerClient>
|
| + m_clientBinding;
|
|
|
| Member<BluetoothDevice> m_device;
|
| bool m_connected;
|
|
|