Chromium Code Reviews| 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 |