| Index: third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
|
| diff --git a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
|
| index 4cd27f84457ff88e3596d94455524cf6683eb220..894b50135f181ed5083f0e8a0221515fe7f07cff 100644
|
| --- a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
|
| +++ b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp
|
| @@ -130,13 +130,6 @@ static void convertRequestDeviceOptions(
|
| }
|
| }
|
|
|
| -void Bluetooth::dispose() {
|
| - // The pipe to this object must be closed when is marked unreachable to
|
| - // prevent messages from being dispatched before lazy sweeping.
|
| - if (m_clientBinding.is_bound())
|
| - m_clientBinding.Close();
|
| -}
|
| -
|
| void Bluetooth::RequestDeviceCallback(
|
| ScriptPromiseResolver* resolver,
|
| mojom::blink::WebBluetoothResult result,
|
| @@ -188,15 +181,6 @@ ScriptPromise Bluetooth::requestDevice(ScriptState* scriptState,
|
|
|
| if (interfaceProvider)
|
| interfaceProvider->getInterface(mojo::MakeRequest(&m_service));
|
| -
|
| - if (m_service) {
|
| - // Create an associated interface ptr and pass it to the
|
| - // WebBluetoothService so that it can send us events without us
|
| - // prompting.
|
| - mojom::blink::WebBluetoothServiceClientAssociatedPtrInfo ptrInfo;
|
| - m_clientBinding.Bind(&ptrInfo);
|
| - m_service->SetClient(std::move(ptrInfo));
|
| - }
|
| }
|
|
|
| if (!m_service) {
|
| @@ -229,53 +213,11 @@ ScriptPromise Bluetooth::requestDevice(ScriptState* scriptState,
|
| return promise;
|
| }
|
|
|
| -void Bluetooth::addToConnectedDevicesMap(const String& deviceId,
|
| - BluetoothDevice* device) {
|
| - m_connectedDevices.insert(deviceId, device);
|
| -}
|
| -
|
| -void Bluetooth::removeFromConnectedDevicesMap(const String& deviceId) {
|
| - m_connectedDevices.remove(deviceId);
|
| -}
|
| -
|
| -void Bluetooth::registerCharacteristicObject(
|
| - const String& characteristicInstanceId,
|
| - BluetoothRemoteGATTCharacteristic* characteristic) {
|
| - m_activeCharacteristics.insert(characteristicInstanceId, characteristic);
|
| -}
|
| -
|
| -void Bluetooth::characteristicObjectRemoved(
|
| - const String& characteristicInstanceId) {
|
| - m_activeCharacteristics.remove(characteristicInstanceId);
|
| -}
|
| -
|
| DEFINE_TRACE(Bluetooth) {
|
| visitor->trace(m_deviceInstanceMap);
|
| - visitor->trace(m_activeCharacteristics);
|
| - visitor->trace(m_connectedDevices);
|
| -}
|
| -
|
| -Bluetooth::Bluetooth() : m_clientBinding(this) {}
|
| -
|
| -void Bluetooth::RemoteCharacteristicValueChanged(
|
| - const WTF::String& characteristicInstanceId,
|
| - const WTF::Vector<uint8_t>& value) {
|
| - BluetoothRemoteGATTCharacteristic* characteristic =
|
| - m_activeCharacteristics.at(characteristicInstanceId);
|
| - if (characteristic)
|
| - characteristic->dispatchCharacteristicValueChanged(value);
|
| }
|
|
|
| -void Bluetooth::GattServerDisconnected(const WTF::String& deviceId) {
|
| - BluetoothDevice* device = m_connectedDevices.at(deviceId);
|
| - if (device) {
|
| - // Remove device from the map before calling dispatchGattServerDisconnected
|
| - // to avoid removing a device the gattserverdisconnected event handler might
|
| - // have re-connected.
|
| - m_connectedDevices.remove(deviceId);
|
| - device->dispatchGattServerDisconnected();
|
| - }
|
| -}
|
| +Bluetooth::Bluetooth() {}
|
|
|
| BluetoothDevice* Bluetooth::getBluetoothDeviceRepresentingDevice(
|
| mojom::blink::WebBluetoothDevicePtr devicePtr,
|
|
|