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

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

Issue 1149883011: bluetooth: Browser-side implementation of readValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-characteristic-initial
Patch Set: Fix merge conflicts Created 5 years, 6 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/child/bluetooth/bluetooth_dispatcher.h
diff --git a/content/child/bluetooth/bluetooth_dispatcher.h b/content/child/bluetooth/bluetooth_dispatcher.h
index 1e1e9e46e1341934ca582905d36c24799276682f..c5260bf6460227455a65140b3949fde01a4e7341 100644
--- a/content/child/bluetooth/bluetooth_dispatcher.h
+++ b/content/child/bluetooth/bluetooth_dispatcher.h
@@ -62,6 +62,8 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
const blink::WebString& service_instance_id,
const blink::WebString& characteristic_uuid,
blink::WebBluetoothGetCharacteristicCallbacks* callbacks);
+ void readValue(const blink::WebString& characteristic_instance_id,
+ blink::WebBluetoothReadValueCallbacks* callbacks);
// WorkerTaskRunner::Observer implementation.
void OnWorkerRunLoopStopped() override;
@@ -95,6 +97,12 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
void OnGetCharacteristicError(int thread_id,
int request_id,
BluetoothError error_type);
+ void OnReadValueSuccess(int thread_id,
+ int request_id,
+ const std::vector<uint8_t>& value);
+ void OnReadValueError(int thread_id,
+ int request_id,
+ BluetoothError error_type);
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
@@ -113,6 +121,9 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
// Tracks requests to get a characteristic from a service.
IDMap<BluetoothCharacteristicRequest, IDMapOwnPointer>
pending_characteristic_requests_;
+ // Tracks requests to read from a characteristics.
+ IDMap<blink::WebBluetoothReadValueCallbacks, IDMapOwnPointer>
+ pending_read_value_requests_;
DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher);
};
« no previous file with comments | « content/browser/bluetooth/bluetooth_dispatcher_host.cc ('k') | content/child/bluetooth/bluetooth_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698