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

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

Issue 1217983004: bluetooth: browser-side implementation of writeValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-origin
Patch Set: Created 5 years, 5 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 254c732a2385bf8bcd07af78f8474cba28556929..75be123c8ca350727e65f063dbaeb307da4722f2 100644
--- a/content/child/bluetooth/bluetooth_dispatcher.h
+++ b/content/child/bluetooth/bluetooth_dispatcher.h
@@ -65,6 +65,10 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
blink::WebBluetoothGetCharacteristicCallbacks* callbacks);
void readValue(const blink::WebString& characteristic_instance_id,
blink::WebBluetoothReadValueCallbacks* callbacks);
+ void writeValue(const blink::WebString& characteristic_instance_id,
+ const unsigned char* bytes,
+ unsigned byteLength,
+ blink::WebBluetoothWriteValueCallbacks*);
// WorkerTaskRunner::Observer implementation.
void OnWorkerRunLoopStopped() override;
@@ -109,6 +113,11 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
int request_id,
BluetoothError error_type,
const std::string& error_message);
+ void OnWriteValueSuccess(int thread_id, int request_id);
+ void OnWriteValueError(int thread_id,
+ int request_id,
+ BluetoothError error_type,
+ const std::string& error_message);
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
@@ -130,6 +139,8 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
// Tracks requests to read from a characteristics.
IDMap<blink::WebBluetoothReadValueCallbacks, IDMapOwnPointer>
pending_read_value_requests_;
+ IDMap<blink::WebBluetoothWriteValueCallbacks, IDMapOwnPointer>
+ pending_write_value_requests_;
DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher);
};

Powered by Google App Engine
This is Rietveld 408576698