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

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

Issue 2637343002: Implement WebBluetooth descriptor.readValue() (Closed)
Patch Set: run bad_message_reasons Created 3 years, 11 months 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 01b3da6f5e8aa59f61ba2198eee05cf9267bc0b6..c8a4c590726844bb6fb92ca659fe42af7a45c7fa 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.h
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -133,6 +133,9 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
blink::mojom::WebBluetoothGATTQueryQuantity quantity,
const base::Optional<device::BluetoothUUID>& characteristics_uuid,
const RemoteCharacteristicGetDescriptorsCallback& callback) override;
+ void RemoteDescriptorReadValue(
+ const std::string& characteristic_instance_id,
+ const RemoteDescriptorReadValueCallback& callback) override;
void RequestDeviceImpl(
blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
@@ -195,6 +198,14 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
const std::string& characteristic_instance_id,
const RemoteCharacteristicStopNotificationsCallback& callback);
+ // Callbacks for BluetoothRemoteGattDescriptor::ReadRemoteDescriptor.
+ void OnDescriptorReadValueSuccess(
+ const RemoteDescriptorReadValueCallback& callback,
+ const std::vector<uint8_t>& value);
+ void OnDescriptorReadValueFailed(
+ const RemoteDescriptorReadValueCallback& callback,
+ device::BluetoothRemoteGattService::GattErrorCode error_code);
+
// Functions to query the platform cache for the bluetooth object.
// result.outcome == CacheQueryOutcome::SUCCESS if the object was found in the
// cache. Otherwise result.outcome that can used to record the outcome and
@@ -217,6 +228,12 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
CacheQueryResult QueryCacheForCharacteristic(
const std::string& characteristic_instance_id);
+ // Queries the platform cache for a descriptor with |descriptor_instance_id|.
+ // Fills in the |outcome| field, and |device|, |service|, |characteristic|,
+ // |descriptor| fields if successful.
+ CacheQueryResult QueryCacheForDescriptor(
+ const std::string& descriptor_instance_id);
+
RenderProcessHost* GetRenderProcessHost();
device::BluetoothAdapter* GetAdapter();
url::Origin GetOrigin();
« no previous file with comments | « content/browser/bluetooth/bluetooth_metrics.cc ('k') | content/browser/bluetooth/web_bluetooth_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698