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

Unified Diff: third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom

Issue 1922923002: bluetooth: Move requestDevice to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-request-device
Patch Set: Remove debug log Created 4 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: third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
index 6818f9bc9526d40203e6cbe6a716c22eb1066d37..7f14be47dad2c10720344df832277b0c6896b2a5 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
+++ b/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom
@@ -68,6 +68,17 @@ enum WebBluetoothError {
ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME,
};
+struct WebBluetoothScanFilter {
+ array<string>? services;
+ string? name;
+ string? name_prefix;
+};
+
+struct WebBluetoothRequestDeviceOptions {
+ array<WebBluetoothScanFilter> filters;
Jeffrey Yasskin 2016/05/13 04:41:59 I don't suppose there's a way to say that the elem
ortuno 2016/05/13 20:11:18 There is! It's the way it's written now haha. If w
+ array<string> optional_services;
+};
+
// Indicates if the function will return a single or multiple
// GATT objects.
enum WebBluetoothGATTQueryQuantity {
@@ -75,6 +86,12 @@ enum WebBluetoothGATTQueryQuantity {
MULTIPLE
};
+struct WebBluetoothDevice {
+ string id;
+ string name;
+ array<string> uuids;
+};
+
struct WebBluetoothRemoteGATTService {
string instance_id;
string uuid;
@@ -97,6 +114,9 @@ interface WebBluetoothService {
// a device disconnects.
SetClient(associated WebBluetoothServiceClient client);
+ RequestDevice(WebBluetoothRequestDeviceOptions options)
+ => (WebBluetoothError error, WebBluetoothDevice? device);
+
// Creates a GATT Connection to a Bluetooth Device with |device_id| if a
// connection to the device didn't exist already. If a GATT connection existed
// already then this function increases the ref count to keep that connection

Powered by Google App Engine
This is Rietveld 408576698