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 // Errors that can occur during Web Bluetooth execution, which are transformed | 9 // Errors that can occur during Web Bluetooth execution, which are transformed |
10 // to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. | 10 // to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 GATT_UNTRANSLATED_ERROR_CODE, | 60 GATT_UNTRANSLATED_ERROR_CODE, |
61 // SecurityError: | 61 // SecurityError: |
62 GATT_NOT_AUTHORIZED, | 62 GATT_NOT_AUTHORIZED, |
63 BLACKLISTED_CHARACTERISTIC_UUID, | 63 BLACKLISTED_CHARACTERISTIC_UUID, |
64 BLACKLISTED_READ, | 64 BLACKLISTED_READ, |
65 BLACKLISTED_WRITE, | 65 BLACKLISTED_WRITE, |
66 NOT_ALLOWED_TO_ACCESS_SERVICE, | 66 NOT_ALLOWED_TO_ACCESS_SERVICE, |
67 REQUEST_DEVICE_WITH_BLACKLISTED_UUID, | 67 REQUEST_DEVICE_WITH_BLACKLISTED_UUID, |
68 REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, | 68 REQUEST_DEVICE_FROM_CROSS_ORIGIN_IFRAME, |
69 REQUEST_DEVICE_WITHOUT_FRAME, | 69 REQUEST_DEVICE_WITHOUT_FRAME, |
70 // SyntaxError: | |
71 // TODO(ortuno): Remove once we no longer use IPC. | 70 // TODO(ortuno): Remove once we no longer use IPC. |
72 ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME, | 71 ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME, |
73 }; | 72 }; |
74 | 73 |
75 struct WebBluetoothScanFilter { | 74 struct WebBluetoothScanFilter { |
76 array<bluetooth.mojom.UUID>? services; | 75 array<bluetooth.mojom.UUID>? services; |
77 string? name; | 76 string? name; |
78 string? name_prefix; | 77 string? name_prefix; |
79 }; | 78 }; |
80 | 79 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 }; | 182 }; |
184 | 183 |
185 // Classes should implement this interface and pass an associated pointer | 184 // Classes should implement this interface and pass an associated pointer |
186 // bound to them to the WebBluetoothService by using SetClient. Classes | 185 // bound to them to the WebBluetoothService by using SetClient. Classes |
187 // that do this will be notified of device events e.g. device disconnection. | 186 // that do this will be notified of device events e.g. device disconnection. |
188 interface WebBluetoothServiceClient { | 187 interface WebBluetoothServiceClient { |
189 RemoteCharacteristicValueChanged(string characteristic_instance_id, | 188 RemoteCharacteristicValueChanged(string characteristic_instance_id, |
190 array<uint8> value); | 189 array<uint8> value); |
191 GattServerDisconnected(WebBluetoothDeviceId device_id); | 190 GattServerDisconnected(WebBluetoothDeviceId device_id); |
192 }; | 191 }; |
OLD | NEW |