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 module blink.mojom; | 5 module blink.mojom; |
5 | 6 |
6 // Errors that can occur during Web Bluetooth execution, which are transformed | 7 // Errors that can occur during Web Bluetooth execution, which are transformed |
7 // to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. | 8 // to a DOMException in Source/modules/bluetooth/BluetoothError.cpp. |
8 // | 9 // |
9 // These errors all produce constant message strings. If a particular message | 10 // These errors all produce constant message strings. If a particular message |
10 // needs a dynamic component, we should add a separate enum so type-checking the | 11 // needs a dynamic component, we should add a separate enum so type-checking the |
11 // IPC ensures the dynamic component is passed. | 12 // IPC ensures the dynamic component is passed. |
12 enum WebBluetoothError { | 13 enum WebBluetoothError { |
13 SUCCESS, | 14 SUCCESS, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 REQUEST_DEVICE_WITH_BLACKLISTED_UUID, | 62 REQUEST_DEVICE_WITH_BLACKLISTED_UUID, |
62 REQUEST_DEVICE_WITH_UNIQUE_ORIGIN, | 63 REQUEST_DEVICE_WITH_UNIQUE_ORIGIN, |
63 REQUEST_DEVICE_WITHOUT_FRAME, | 64 REQUEST_DEVICE_WITHOUT_FRAME, |
64 // SyntaxError: | 65 // SyntaxError: |
65 // TODO(ortuno): Remove once we no longer use IPC. | 66 // TODO(ortuno): Remove once we no longer use IPC. |
66 ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME, | 67 ENUM_MAX_VALUE = REQUEST_DEVICE_WITHOUT_FRAME, |
67 }; | 68 }; |
68 | 69 |
69 // TODO(ortuno): Define Bluetooth Service. | 70 // TODO(ortuno): Define Bluetooth Service. |
70 // https://crbug.com/508771 | 71 // https://crbug.com/508771 |
| 72 |
| 73 // Web Bluetooth Interface that Blink can use to perform |
| 74 // Bluetooth GATT Operations on Bluetooth Devices. |
| 75 interface WebBluetoothService { |
| 76 |
| 77 // Writes a value to the characteristic with |
| 78 // |characteristic_instance_id|. The callback is run with |
| 79 // WebBluetoothError::SUCCESS if the value was successfully |
| 80 // written. |
| 81 RemoteCharacteristicWriteValue( |
| 82 string characteristic_instance_id, |
| 83 array<uint8> value) => (WebBluetoothError error); |
| 84 |
| 85 }; |
OLD | NEW |