| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 int /* request_id */, | 168 int /* request_id */, |
| 169 std::vector<uint8_t> /* value */) | 169 std::vector<uint8_t> /* value */) |
| 170 | 170 |
| 171 // Informs the renderer that an error occurred while reading the value. | 171 // Informs the renderer that an error occurred while reading the value. |
| 172 IPC_MESSAGE_CONTROL4(BluetoothMsg_ReadCharacteristicValueError, | 172 IPC_MESSAGE_CONTROL4(BluetoothMsg_ReadCharacteristicValueError, |
| 173 int /* thread_id */, | 173 int /* thread_id */, |
| 174 int /* request_id */, | 174 int /* request_id */, |
| 175 content::BluetoothError /* result */, | 175 content::BluetoothError /* result */, |
| 176 std::string /* error_message */) | 176 std::string /* error_message */) |
| 177 | 177 |
| 178 // Informs the renderer that the value has been successfully written to |
| 179 // the characteristic. |
| 180 IPC_MESSAGE_CONTROL2(BluetoothMsg_WriteCharacteristicValueSuccess, |
| 181 int /* thread_id */, |
| 182 int /* request_id */) |
| 183 |
| 184 // Informs the renderer that an error occurred while writing a value to a |
| 185 // characteristic. |
| 186 IPC_MESSAGE_CONTROL4(BluetoothMsg_WriteCharacteristicValueError, |
| 187 int /* thread_id */, |
| 188 int /* request_id */, |
| 189 content::BluetoothError /* result */, |
| 190 std::string /* error_message */) |
| 191 |
| 178 // Messages sent from the renderer to the browser. | 192 // Messages sent from the renderer to the browser. |
| 179 | 193 |
| 180 // Requests a bluetooth device from the browser. | 194 // Requests a bluetooth device from the browser. |
| 181 // TODO(scheib): UI to select and permit access to a device crbug.com/436280. | 195 // TODO(scheib): UI to select and permit access to a device crbug.com/436280. |
| 182 // This will include refactoring messages to be associated with an origin | 196 // This will include refactoring messages to be associated with an origin |
| 183 // and making this initial requestDevice call with an associated frame. | 197 // and making this initial requestDevice call with an associated frame. |
| 184 // This work is deferred to simplify initial prototype patches. | 198 // This work is deferred to simplify initial prototype patches. |
| 185 // The Bluetooth feature, and the BluetoothDispatcherHost are behind | 199 // The Bluetooth feature, and the BluetoothDispatcherHost are behind |
| 186 // the --enable-experimental-web-platform-features flag. | 200 // the --enable-experimental-web-platform-features flag. |
| 187 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_RequestDevice, | 201 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_RequestDevice, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 208 int /* thread_id */, | 222 int /* thread_id */, |
| 209 int /* request_id */, | 223 int /* request_id */, |
| 210 std::string /* service_instance_id */, | 224 std::string /* service_instance_id */, |
| 211 std::string /* characteristic_uuid */) | 225 std::string /* characteristic_uuid */) |
| 212 | 226 |
| 213 // Reads the characteristics value from a bluetooth device. | 227 // Reads the characteristics value from a bluetooth device. |
| 214 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_ReadValue, | 228 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_ReadValue, |
| 215 int /* thread_id */, | 229 int /* thread_id */, |
| 216 int /* request_id */, | 230 int /* request_id */, |
| 217 std::string /* characteristic_instance_id */) | 231 std::string /* characteristic_instance_id */) |
| 232 |
| 233 // Writes a value to a bluetooth device's characteristic. |
| 234 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_WriteValue, |
| 235 int /* thread_id */, |
| 236 int /* request_id */, |
| 237 std::string /* characteristic_instance_id */, |
| 238 std::vector<uint8_t> /* value */) |
| OLD | NEW |