Chromium Code Reviews| Index: components/arc/bluetooth/arc_bluetooth_bridge.h |
| diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.h b/components/arc/bluetooth/arc_bluetooth_bridge.h |
| index 6ac811cbc8985721f098d7425ae2c0d8d4d593c7..09fc8dabc28d35724af07d84d8ceac807abbc93f 100644 |
| --- a/components/arc/bluetooth/arc_bluetooth_bridge.h |
| +++ b/components/arc/bluetooth/arc_bluetooth_bridge.h |
| @@ -118,6 +118,22 @@ class ArcBluetoothBridge |
| const std::vector<uint8_t>& value) override; |
| // Overridden from device::BluetoothLocalGattService::Delegate |
| + template <class T> |
| + void OnGattAttributeReadRequest(const device::BluetoothDevice* device, |
| + const T* gatt_obj, |
| + int offset, |
| + const ValueCallback& callback, |
| + const ErrorCallback& error_callback); |
| + |
| + template <class T> |
| + void OnGattAttributeWriteRequest( |
| + const device::BluetoothDevice* device, |
| + const T* gatt_obj, |
| + const std::vector<uint8_t>& value, |
| + int offset, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) override; |
| + |
| void OnCharacteristicReadRequest( |
| const device::BluetoothDevice* device, |
| const device::BluetoothLocalGattCharacteristic* characteristic, |
| @@ -353,6 +369,10 @@ class ArcBluetoothBridge |
| template <class T> |
| int32_t CreateGattAttributeHandle(T* gatt_obj); |
| + int32_t CreateGattReadTransaction(const ValueCallback& successCallback, |
| + const ErrorCallback& errorCallback); |
| + int32_t CreateGattWriteTransaction(const base::Closure& successCallback, |
| + const ErrorCallback& errorCallback); |
| mojo::Binding<mojom::BluetoothHost> binding_; |
| @@ -363,6 +383,10 @@ class ArcBluetoothBridge |
| notification_session_; |
| // Map from android int handle to Chrome (BlueZ) string identifier. |
| std::map<int32_t, std::string> gatt_identifier_; |
| + std::map<int32_t, std::pair<ValueCallback, ErrorCallback>> |
|
rkc
2016/07/01 22:51:32
Can we have this aliased with using? It would also
puthik_chromium
2016/07/14 22:45:12
Done.
|
| + gatt_read_callbacks_; |
| + std::map<int32_t, std::pair<base::Closure, ErrorCallback>> |
| + gatt_write_callbacks_; |
| // WeakPtrFactory to use for callbacks. |
| base::WeakPtrFactory<ArcBluetoothBridge> weak_factory_; |