Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module blink.mojom; | 5 module blink.mojom; |
| 6 | 6 |
| 7 import "device/bluetooth/public/interfaces/uuid.mojom"; | 7 import "device/bluetooth/public/interfaces/uuid.mojom"; |
| 8 | 8 |
| 9 // Result codes that can occur during Web Bluetooth execution, which are | 9 // Result codes that can occur during Web Bluetooth execution, which are |
| 10 // transformed to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. | 10 // transformed to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 REQUEST_DEVICE_WITHOUT_FRAME, | 70 REQUEST_DEVICE_WITHOUT_FRAME, |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 struct WebBluetoothScanFilter { | 73 struct WebBluetoothScanFilter { |
| 74 array<bluetooth.mojom.UUID>? services; | 74 array<bluetooth.mojom.UUID>? services; |
| 75 string? name; | 75 string? name; |
| 76 string? name_prefix; | 76 string? name_prefix; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 struct WebBluetoothRequestDeviceOptions { | 79 struct WebBluetoothRequestDeviceOptions { |
| 80 array<WebBluetoothScanFilter> filters; | 80 array<WebBluetoothScanFilter> filters; |
|
ortuno
2016/10/31 00:00:03
Make this optional.
| |
| 81 array<bluetooth.mojom.UUID> optional_services; | 81 array<bluetooth.mojom.UUID> optional_services; |
| 82 bool accept_all_devices; | |
|
ortuno
2016/10/31 00:00:03
I don't think we need this one. We want this part
| |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 // Indicates if the function will return a single or multiple | 85 // Indicates if the function will return a single or multiple |
| 85 // GATT objects. | 86 // GATT objects. |
| 86 enum WebBluetoothGATTQueryQuantity { | 87 enum WebBluetoothGATTQueryQuantity { |
| 87 SINGLE, | 88 SINGLE, |
| 88 MULTIPLE | 89 MULTIPLE |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 struct WebBluetoothDeviceId { | 92 struct WebBluetoothDeviceId { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 }; | 181 }; |
| 181 | 182 |
| 182 // Classes should implement this interface and pass an associated pointer | 183 // Classes should implement this interface and pass an associated pointer |
| 183 // bound to them to the WebBluetoothService by using SetClient. Classes | 184 // bound to them to the WebBluetoothService by using SetClient. Classes |
| 184 // that do this will be notified of device events e.g. device disconnection. | 185 // that do this will be notified of device events e.g. device disconnection. |
| 185 interface WebBluetoothServiceClient { | 186 interface WebBluetoothServiceClient { |
| 186 RemoteCharacteristicValueChanged(string characteristic_instance_id, | 187 RemoteCharacteristicValueChanged(string characteristic_instance_id, |
| 187 array<uint8> value); | 188 array<uint8> value); |
| 188 GattServerDisconnected(WebBluetoothDeviceId device_id); | 189 GattServerDisconnected(WebBluetoothDeviceId device_id); |
| 189 }; | 190 }; |
| OLD | NEW |