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

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

Issue 1156573005: bluetooth: Browser-side implementation of getCharacteristic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-primary-service-initial
Patch Set: Fix histograms.xml and bad_messages.h merge conflict 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 94a20afbbf5f1023ff4ee55d8cf3c41560fb4866..1e1e9e46e1341934ca582905d36c24799276682f 100644
--- a/content/child/bluetooth/bluetooth_dispatcher.h
+++ b/content/child/bluetooth/bluetooth_dispatcher.h
@@ -21,6 +21,7 @@ namespace IPC {
class Message;
}
+struct BluetoothCharacteristicRequest;
struct BluetoothPrimaryServiceRequest;
namespace content {
@@ -57,6 +58,11 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
const blink::WebString& service_uuid,
blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks);
+ void getCharacteristic(
+ const blink::WebString& service_instance_id,
+ const blink::WebString& characteristic_uuid,
+ blink::WebBluetoothGetCharacteristicCallbacks* callbacks);
+
// WorkerTaskRunner::Observer implementation.
void OnWorkerRunLoopStopped() override;
@@ -82,6 +88,13 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
void OnGetPrimaryServiceError(int thread_id,
int request_id,
BluetoothError error_type);
+ void OnGetCharacteristicSuccess(
+ int thread_id,
+ int request_id,
+ const std::string& characteristic_instance_id);
+ void OnGetCharacteristicError(int thread_id,
+ int request_id,
+ BluetoothError error_type);
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
@@ -97,6 +110,9 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
// Owns request objects.
IDMap<BluetoothPrimaryServiceRequest, IDMapOwnPointer>
pending_primary_service_requests_;
+ // Tracks requests to get a characteristic from a service.
+ IDMap<BluetoothCharacteristicRequest, IDMapOwnPointer>
+ pending_characteristic_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