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

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

Issue 1159523002: bluetooth: Browser side partial implementation of getPrimaryService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed order of gypi Created 5 years, 7 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 4bd4f250257e666a045ab51eca9a4baa528d6cd4..2cb797cbf30be842f340a1dd5d9537586059dc76 100644
--- a/content/child/bluetooth/bluetooth_dispatcher.h
+++ b/content/child/bluetooth/bluetooth_dispatcher.h
@@ -23,6 +23,7 @@ class Message;
namespace content {
class ThreadSafeSender;
+struct BluetoothPrimaryServiceRequest;
// Dispatcher for child process threads which communicates to the browser's
// BluetoothDispatcherHost.
@@ -50,6 +51,10 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
void requestDevice(blink::WebBluetoothRequestDeviceCallbacks* callbacks);
void connectGATT(const blink::WebString& device_instance_id,
blink::WebBluetoothConnectGATTCallbacks* callbacks);
+ void getPrimaryService(
+ const blink::WebString& device_instance_id,
+ const blink::WebString& service_uuid,
+ blink::WebBluetoothGetPrimaryServiceCallbacks* callbacks);
// WorkerTaskRunner::Observer implementation.
void OnWorkerRunLoopStopped() override;
@@ -70,6 +75,12 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
void OnConnectGATTError(int thread_id,
int request_id,
BluetoothError error_type);
+ void OnGetPrimaryServiceSuccess(int thread_id,
+ int request_id,
+ const std::string& service_instance_id);
+ void OnGetPrimaryServiceError(int thread_id,
+ int request_id,
+ BluetoothError error_type);
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
@@ -81,6 +92,10 @@ class BluetoothDispatcher : public WorkerTaskRunner::Observer {
// Owns callback objects.
IDMap<blink::WebBluetoothConnectGATTCallbacks, IDMapOwnPointer>
pending_connect_requests_;
+ // Tracks requests to get a primary service from a device.
+ // Owns callback objects.
Jeffrey Yasskin 2015/05/29 20:31:42 They aren't callback objects anymore. :)
ortuno 2015/06/01 18:27:03 Done.
+ IDMap<BluetoothPrimaryServiceRequest, IDMapOwnPointer>
+ pending_primary_service_requests_;
DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher);
};

Powered by Google App Engine
This is Rietveld 408576698