| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Messages for Web Bluetooth API. | 5 // Messages for Web Bluetooth API. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 // Web Bluetooth Security | 8 // Web Bluetooth Security |
| 9 // The security mechanisms of Bluetooth are described in the specification: | 9 // The security mechanisms of Bluetooth are described in the specification: |
| 10 // https://webbluetoothchrome.github.io/web-bluetooth | 10 // https://webbluetoothchrome.github.io/web-bluetooth |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 int /* thread_id */, | 186 int /* thread_id */, |
| 187 int /* request_id */, | 187 int /* request_id */, |
| 188 std::vector<uint8_t> /* value */) | 188 std::vector<uint8_t> /* value */) |
| 189 | 189 |
| 190 // Informs the renderer that an error occurred while reading the value. | 190 // Informs the renderer that an error occurred while reading the value. |
| 191 IPC_MESSAGE_CONTROL3(BluetoothMsg_ReadCharacteristicValueError, | 191 IPC_MESSAGE_CONTROL3(BluetoothMsg_ReadCharacteristicValueError, |
| 192 int /* thread_id */, | 192 int /* thread_id */, |
| 193 int /* request_id */, | 193 int /* request_id */, |
| 194 blink::WebBluetoothError /* result */) | 194 blink::WebBluetoothError /* result */) |
| 195 | 195 |
| 196 // Informs the renderer that the value has been successfully written to | |
| 197 // the characteristic. | |
| 198 IPC_MESSAGE_CONTROL2(BluetoothMsg_WriteCharacteristicValueSuccess, | |
| 199 int /* thread_id */, | |
| 200 int /* request_id */) | |
| 201 | |
| 202 // Informs the renderer that an error occurred while writing a value to a | |
| 203 // characteristic. | |
| 204 IPC_MESSAGE_CONTROL3(BluetoothMsg_WriteCharacteristicValueError, | |
| 205 int /* thread_id */, | |
| 206 int /* request_id */, | |
| 207 blink::WebBluetoothError /* result */) | |
| 208 | |
| 209 // Informs the renderer that the user has successfully subscribed to | 196 // Informs the renderer that the user has successfully subscribed to |
| 210 // notifications from the device. | 197 // notifications from the device. |
| 211 IPC_MESSAGE_CONTROL2(BluetoothMsg_StartNotificationsSuccess, | 198 IPC_MESSAGE_CONTROL2(BluetoothMsg_StartNotificationsSuccess, |
| 212 int /* thread_id */, | 199 int /* thread_id */, |
| 213 int /* request_id */) | 200 int /* request_id */) |
| 214 | 201 |
| 215 // Informs the renderer that an error ocurred when trying to subscribe to | 202 // Informs the renderer that an error ocurred when trying to subscribe to |
| 216 // notifications from the device. | 203 // notifications from the device. |
| 217 IPC_MESSAGE_CONTROL3(BluetoothMsg_StartNotificationsError, | 204 IPC_MESSAGE_CONTROL3(BluetoothMsg_StartNotificationsError, |
| 218 int /* thread_id */, | 205 int /* thread_id */, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 std::string /* service_instance_id */, | 265 std::string /* service_instance_id */, |
| 279 std::string /* characteristics_uuid */) | 266 std::string /* characteristics_uuid */) |
| 280 | 267 |
| 281 // Reads the characteristics value from a bluetooth device. | 268 // Reads the characteristics value from a bluetooth device. |
| 282 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_ReadValue, | 269 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_ReadValue, |
| 283 int /* thread_id */, | 270 int /* thread_id */, |
| 284 int /* request_id */, | 271 int /* request_id */, |
| 285 int /* frame_routing_id */, | 272 int /* frame_routing_id */, |
| 286 std::string /* characteristic_instance_id */) | 273 std::string /* characteristic_instance_id */) |
| 287 | 274 |
| 288 // Writes a value to a bluetooth device's characteristic. | |
| 289 IPC_MESSAGE_CONTROL5(BluetoothHostMsg_WriteValue, | |
| 290 int /* thread_id */, | |
| 291 int /* request_id */, | |
| 292 int /* frame_routing_id */, | |
| 293 std::string /* characteristic_instance_id */, | |
| 294 std::vector<uint8_t> /* value */) | |
| 295 | |
| 296 // Subscribes to notifications from a device's characteristic. | 275 // Subscribes to notifications from a device's characteristic. |
| 297 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_StartNotifications, | 276 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_StartNotifications, |
| 298 int /* thread_id */, | 277 int /* thread_id */, |
| 299 int /* request_id */, | 278 int /* request_id */, |
| 300 int /* frame_routing_id */, | 279 int /* frame_routing_id */, |
| 301 std::string /* characteristic_instance_id */) | 280 std::string /* characteristic_instance_id */) |
| 302 | 281 |
| 303 // Unsubscribes from notifications from a device's characteristic. | 282 // Unsubscribes from notifications from a device's characteristic. |
| 304 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_StopNotifications, | 283 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_StopNotifications, |
| 305 int /* thread_id */, | 284 int /* thread_id */, |
| 306 int /* request_id */, | 285 int /* request_id */, |
| 307 int /* frame_routing_id */, | 286 int /* frame_routing_id */, |
| 308 std::string /* characteristic_instance_id */) | 287 std::string /* characteristic_instance_id */) |
| 309 | 288 |
| 310 // Register to receive characteristic value changed events. | 289 // Register to receive characteristic value changed events. |
| 311 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_RegisterCharacteristic, | 290 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_RegisterCharacteristic, |
| 312 int /* thread_id */, | 291 int /* thread_id */, |
| 313 int /* frame_routing_id */, | 292 int /* frame_routing_id */, |
| 314 std::string /* characteristics_instance_id */) | 293 std::string /* characteristics_instance_id */) |
| 315 | 294 |
| 316 // Unregister from characteristic value changed events. | 295 // Unregister from characteristic value changed events. |
| 317 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_UnregisterCharacteristic, | 296 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_UnregisterCharacteristic, |
| 318 int /* thread_id */, | 297 int /* thread_id */, |
| 319 int /* frame_routing_id */, | 298 int /* frame_routing_id */, |
| 320 std::string /* characteristics_instance_id */) | 299 std::string /* characteristics_instance_id */) |
| OLD | NEW |