Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1400)

Unified Diff: content/browser/bluetooth/web_bluetooth_service_impl.h

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Remove macos restriction Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/bluetooth/web_bluetooth_service_impl.h
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h
index 7bc0feb7825fa050ed641cd95b59954f55d3a447..aa5bf8ce764510e445c512397be29cec7a8d4fe9 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.h
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -128,6 +128,11 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
void RemoteCharacteristicStopNotifications(
const std::string& characteristic_instance_id,
const RemoteCharacteristicStopNotificationsCallback& callback) override;
+ void RemoteCharacteristicGetDescriptors(
+ const std::string& service_instance_id,
+ blink::mojom::WebBluetoothGATTQueryQuantity quantity,
+ const base::Optional<device::BluetoothUUID>& characteristics_uuid,
+ const RemoteCharacteristicGetDescriptorsCallback& callback) override;
void RequestDeviceImpl(
blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
@@ -163,16 +168,17 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
device::BluetoothDevice::ConnectErrorCode error_code);
// Callbacks for BluetoothRemoteGattCharacteristic::ReadRemoteCharacteristic.
- void OnReadValueSuccess(const RemoteCharacteristicReadValueCallback& callback,
- const std::vector<uint8_t>& value);
- void OnReadValueFailed(
+ void OnCharacteristicReadValueSuccess(
+ const RemoteCharacteristicReadValueCallback& callback,
+ const std::vector<uint8_t>& value);
+ void OnCharacteristicReadValueFailed(
const RemoteCharacteristicReadValueCallback& callback,
device::BluetoothRemoteGattService::GattErrorCode error_code);
// Callbacks for BluetoothRemoteGattCharacteristic::WriteRemoteCharacteristic.
- void OnWriteValueSuccess(
+ void OnCharacteristicWriteValueSuccess(
const RemoteCharacteristicWriteValueCallback& callback);
- void OnWriteValueFailed(
+ void OnCharacteristicWriteValueFailed(
const RemoteCharacteristicWriteValueCallback& callback,
device::BluetoothRemoteGattService::GattErrorCode error_code);
@@ -227,6 +233,8 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
// Maps to get the object's parent based on its instanceID.
std::unordered_map<std::string, std::string> service_id_to_device_address_;
std::unordered_map<std::string, std::string> characteristic_id_to_service_id_;
+ std::unordered_map<std::string, std::string>
+ descriptor_id_to_characteristic_id_;
// Map to keep track of the connected Bluetooth devices.
std::unique_ptr<FrameConnectedBluetoothDevices> connected_devices_;

Powered by Google App Engine
This is Rietveld 408576698