Index: third_party/WebKit/Source/modules/bluetooth/Bluetooth.h |
diff --git a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.h b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.h |
index 9b39b7ab1528e3e629d36e7691946ad073206e4a..9f351d1cb57c27857c2ae6d5174141e68392c42b 100644 |
--- a/third_party/WebKit/Source/modules/bluetooth/Bluetooth.h |
+++ b/third_party/WebKit/Source/modules/bluetooth/Bluetooth.h |
@@ -8,29 +8,23 @@ |
#include "bindings/core/v8/ScriptPromise.h" |
#include "bindings/core/v8/ScriptWrappable.h" |
#include "modules/bluetooth/BluetoothDevice.h" |
-#include "mojo/public/cpp/bindings/associated_binding.h" |
#include "platform/heap/Handle.h" |
#include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h" |
#include <memory> |
namespace blink { |
-class BluetoothRemoteGATTCharacteristic; |
class RequestDeviceOptions; |
class ScriptPromise; |
class ScriptState; |
-class Bluetooth : public GarbageCollectedFinalized<Bluetooth>, |
- public ScriptWrappable, |
- public mojom::blink::WebBluetoothServiceClient { |
+class Bluetooth final : public GarbageCollectedFinalized<Bluetooth>, |
+ public ScriptWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
- USING_PRE_FINALIZER(Bluetooth, dispose); |
public: |
static Bluetooth* create() { return new Bluetooth(); } |
- void dispose(); |
- |
// BluetoothDiscovery interface |
ScriptPromise requestDevice(ScriptState*, |
const RequestDeviceOptions&, |
@@ -38,26 +32,12 @@ class Bluetooth : public GarbageCollectedFinalized<Bluetooth>, |
mojom::blink::WebBluetoothService* service() { return m_service.get(); } |
- void addToConnectedDevicesMap(const String& deviceId, BluetoothDevice*); |
- |
- void removeFromConnectedDevicesMap(const String& deviceId); |
- |
- void registerCharacteristicObject(const String& characteristicInstanceId, |
- BluetoothRemoteGATTCharacteristic*); |
- void characteristicObjectRemoved(const String& characteristicInstanceId); |
- |
// Interface required by Garbage Collection: |
DECLARE_VIRTUAL_TRACE(); |
private: |
Bluetooth(); |
- // mojom::blink::WebBluetoothServiceClient: |
- void RemoteCharacteristicValueChanged( |
- const WTF::String& characteristicInstanceId, |
- const WTF::Vector<uint8_t>& value) override; |
- void GattServerDisconnected(const WTF::String& deviceId) override; |
- |
BluetoothDevice* getBluetoothDeviceRepresentingDevice( |
mojom::blink::WebBluetoothDevicePtr, |
ScriptPromiseResolver*); |
@@ -71,24 +51,7 @@ class Bluetooth : public GarbageCollectedFinalized<Bluetooth>, |
// Bluetooth device inside a single global object. |
HeapHashMap<String, Member<BluetoothDevice>> m_deviceInstanceMap; |
- // Map of characteristic instance ids to BluetoothRemoteGATTCharacteristic. |
- // When characteristicObjectRemoved is called the characteristic should be |
- // removed from the map. Keeps track of what characteristics have listeners. |
- HeapHashMap<String, Member<BluetoothRemoteGATTCharacteristic>> |
- m_activeCharacteristics; |
- |
- // Map of device ids to BluetoothDevice. Added in |
- // BluetoothRemoteGATTServer::connect() and removed in |
- // BluetoothRemoteGATTServer::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. |
- HeapHashMap<String, Member<BluetoothDevice>> m_connectedDevices; |
- |
mojom::blink::WebBluetoothServicePtr m_service; |
- |
- // Binding associated with |m_service|. |
- mojo::AssociatedBinding<mojom::blink::WebBluetoothServiceClient> |
- m_clientBinding; |
}; |
} // namespace blink |