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

Unified Diff: content/renderer/bluetooth/bluetooth_dispatcher.h

Issue 1723723002: bluetooth: Implement Service.getCharacteristics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Clean up Created 4 years, 10 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/renderer/bluetooth/bluetooth_dispatcher.h
diff --git a/content/renderer/bluetooth/bluetooth_dispatcher.h b/content/renderer/bluetooth/bluetooth_dispatcher.h
index 1054ac4b0e018ddcb326d7d487cefbc763fd9331..88021532c2dcbe96974be0e6543b21452c813e60 100644
--- a/content/renderer/bluetooth/bluetooth_dispatcher.h
+++ b/content/renderer/bluetooth/bluetooth_dispatcher.h
@@ -32,6 +32,7 @@ class Message;
}
struct BluetoothCharacteristicRequest;
+struct BluetoothCharacteristicsRequest;
struct BluetoothPrimaryServiceRequest;
struct BluetoothWriteValueRequest;
struct BluetoothNotificationsRequest;
@@ -74,12 +75,16 @@ class BluetoothDispatcher : public WorkerThread::Observer {
const blink::WebString& device_id,
const blink::WebString& service_uuid,
blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks);
-
void getCharacteristic(
int frame_routing_id,
const blink::WebString& service_instance_id,
const blink::WebString& characteristic_uuid,
blink::WebBluetoothGetCharacteristicCallbacks* callbacks);
+ void getCharacteristics(
+ int frame_routing_id,
+ const blink::WebString& service_instance_id,
+ const blink::WebString& characteristic_uuid,
+ blink::WebBluetoothGetCharacteristicsCallbacks* callbacks);
void readValue(int frame_routing_id,
const blink::WebString& characteristic_instance_id,
blink::WebBluetoothReadValueCallbacks* callbacks);
@@ -196,6 +201,15 @@ class BluetoothDispatcher : public WorkerThread::Observer {
void OnGetCharacteristicError(int thread_id,
int request_id,
blink::WebBluetoothError error);
+ void OnGetCharacteristicsSuccess(
+ int thread_id,
+ int request_id,
+ const std::vector<std::string>& characteristics_instance_ids,
+ const std::vector<std::string>& characteristics_uuids,
+ const std::vector<uint32_t>& characteristic_properties);
+ void OnGetCharacteristicsError(int thread_id,
+ int request_id,
+ blink::WebBluetoothError error);
void OnReadValueSuccess(int thread_id,
int request_id,
const std::vector<uint8_t>& value);
@@ -237,6 +251,9 @@ class BluetoothDispatcher : public WorkerThread::Observer {
// Tracks requests to get a characteristic from a service.
IDMap<BluetoothCharacteristicRequest, IDMapOwnPointer>
pending_characteristic_requests_;
+ // Tracks requests to get characteristics from a service.
+ IDMap<BluetoothCharacteristicsRequest, IDMapOwnPointer>
+ pending_characteristics_requests_;
// Tracks requests to read from a characteristics.
IDMap<blink::WebBluetoothReadValueCallbacks, IDMapOwnPointer>
pending_read_value_requests_;

Powered by Google App Engine
This is Rietveld 408576698