| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef Bluetooth_h | 5 #ifndef Bluetooth_h |
| 6 #define Bluetooth_h | 6 #define Bluetooth_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "modules/bluetooth/BluetoothDevice.h" | 10 #include "modules/bluetooth/BluetoothDevice.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // Interface required by Garbage Collection: | 49 // Interface required by Garbage Collection: |
| 50 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 Bluetooth(); | 53 Bluetooth(); |
| 54 | 54 |
| 55 // mojom::blink::WebBluetoothServiceClient: | 55 // mojom::blink::WebBluetoothServiceClient: |
| 56 void RemoteCharacteristicValueChanged( | 56 void RemoteCharacteristicValueChanged( |
| 57 const WTF::String& characteristicInstanceId, | 57 const WTF::String& characteristicInstanceId, |
| 58 const WTF::Vector<uint8_t>& value) override; | 58 const WTF::Vector<uint8_t>& value) override; |
| 59 void GattServerDisconnected(mojom::blink::WebBluetoothDeviceIdPtr) override; | 59 void GattServerDisconnected(const WTF::String& deviceId) override; |
| 60 | 60 |
| 61 BluetoothDevice* getBluetoothDeviceRepresentingDevice(const String& id, | 61 BluetoothDevice* getBluetoothDeviceRepresentingDevice( |
| 62 const String& name, | 62 mojom::blink::WebBluetoothDevicePtr, |
| 63 ScriptPromiseResolver*); | 63 ScriptPromiseResolver*); |
| 64 | 64 |
| 65 void RequestDeviceCallback(ScriptPromiseResolver*, | 65 void RequestDeviceCallback(ScriptPromiseResolver*, |
| 66 mojom::blink::WebBluetoothResult, | 66 mojom::blink::WebBluetoothResult, |
| 67 mojom::blink::WebBluetoothDevicePtr); | 67 mojom::blink::WebBluetoothDevicePtr); |
| 68 | 68 |
| 69 // Map of device ids to BluetoothDevice objects. | 69 // Map of device ids to BluetoothDevice objects. |
| 70 // Ensures only one BluetoothDevice instance represents each | 70 // Ensures only one BluetoothDevice instance represents each |
| 71 // Bluetooth device inside a single global object. | 71 // Bluetooth device inside a single global object. |
| 72 HeapHashMap<String, Member<BluetoothDevice>> m_deviceInstanceMap; | 72 HeapHashMap<String, Member<BluetoothDevice>> m_deviceInstanceMap; |
| 73 | 73 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 87 mojom::blink::WebBluetoothServicePtr m_service; | 87 mojom::blink::WebBluetoothServicePtr m_service; |
| 88 | 88 |
| 89 // Binding associated with |m_service|. | 89 // Binding associated with |m_service|. |
| 90 mojo::AssociatedBinding<mojom::blink::WebBluetoothServiceClient> | 90 mojo::AssociatedBinding<mojom::blink::WebBluetoothServiceClient> |
| 91 m_clientBinding; | 91 m_clientBinding; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| 95 | 95 |
| 96 #endif // Bluetooth_h | 96 #endif // Bluetooth_h |
| OLD | NEW |