Chromium Code Reviews| 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://webbluetoothcg.github.io/web-bluetooth | 10 // https://webbluetoothcg.github.io/web-bluetooth |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 int /* thread_id */, | 128 int /* thread_id */, |
| 129 int /* request_id */, | 129 int /* request_id */, |
| 130 content::BluetoothError /* result */) | 130 content::BluetoothError /* result */) |
| 131 | 131 |
| 132 // Informs the renderer that primary service request |request_id| succeeded. | 132 // Informs the renderer that primary service request |request_id| succeeded. |
| 133 IPC_MESSAGE_CONTROL3(BluetoothMsg_GetPrimaryServiceSuccess, | 133 IPC_MESSAGE_CONTROL3(BluetoothMsg_GetPrimaryServiceSuccess, |
| 134 int /* thread_id */, | 134 int /* thread_id */, |
| 135 int /* request_id */, | 135 int /* request_id */, |
| 136 std::string /* service_instance_id */) | 136 std::string /* service_instance_id */) |
| 137 | 137 |
| 138 // Informs the renderer that the primary service request |request_id| failed. | 138 // Informs the renderer that the primary_service request |request_id| failed. |
|
Jeffrey Yasskin
2015/06/02 22:12:29
Why the extra '_' here?
ortuno
2015/06/03 20:27:23
Done.
| |
| 139 IPC_MESSAGE_CONTROL3(BluetoothMsg_GetPrimaryServiceError, | 139 IPC_MESSAGE_CONTROL3(BluetoothMsg_GetPrimaryServiceError, |
| 140 int /* thread_id */, | 140 int /* thread_id */, |
| 141 int /* request_id */, | 141 int /* request_id */, |
| 142 content::BluetoothError /* result */) | 142 content::BluetoothError /* result */) |
| 143 | 143 |
| 144 // Informs the renderer that characteristic request |request_id| succeeded. | |
| 145 IPC_MESSAGE_CONTROL3(BluetoothMsg_GetCharacteristicSuccess, | |
| 146 int /* thread_id */, | |
| 147 int /* request_id */, | |
| 148 std::string /* characteristic_instance_id */) | |
| 149 | |
| 150 // Informs the renderer that the characteristic request |request_id| failed. | |
| 151 IPC_MESSAGE_CONTROL3(BluetoothMsg_GetCharacteristicError, | |
| 152 int /* thread_id */, | |
| 153 int /* request_id */, | |
| 154 content::BluetoothError /* result */) | |
| 155 | |
| 144 // Messages sent from the renderer to the browser. | 156 // Messages sent from the renderer to the browser. |
| 145 | 157 |
| 146 // Requests a bluetooth device from the browser. | 158 // Requests a bluetooth device from the browser. |
| 147 // TODO(scheib): UI to select and permit access to a device crbug.com/436280. | 159 // TODO(scheib): UI to select and permit access to a device crbug.com/436280. |
| 148 // This will include refactoring messages to be associated with an origin | 160 // This will include refactoring messages to be associated with an origin |
| 149 // and making this initial requestDevice call with an associated frame. | 161 // and making this initial requestDevice call with an associated frame. |
| 150 // This work is deferred to simplify initial prototype patches. | 162 // This work is deferred to simplify initial prototype patches. |
| 151 // The Bluetooth feature, and the BluetoothDispatcherHost are behind | 163 // The Bluetooth feature, and the BluetoothDispatcherHost are behind |
| 152 // the --enable-experimental-web-platform-features flag. | 164 // the --enable-experimental-web-platform-features flag. |
| 153 IPC_MESSAGE_CONTROL2(BluetoothHostMsg_RequestDevice, | 165 IPC_MESSAGE_CONTROL2(BluetoothHostMsg_RequestDevice, |
| 154 int /* thread_id */, | 166 int /* thread_id */, |
| 155 int /* request_id */) | 167 int /* request_id */) |
| 156 | 168 |
| 157 // Connects to a bluetooth device. | 169 // Connects to a bluetooth device. |
| 158 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_ConnectGATT, | 170 IPC_MESSAGE_CONTROL3(BluetoothHostMsg_ConnectGATT, |
| 159 int /* thread_id */, | 171 int /* thread_id */, |
| 160 int /* request_id */, | 172 int /* request_id */, |
| 161 std::string /* device_instance_id */) | 173 std::string /* device_instance_id */) |
| 162 | 174 |
| 163 // Gets primary service from bluetooth device. | 175 // Gets primary service from bluetooth device. |
| 164 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_GetPrimaryService, | 176 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_GetPrimaryService, |
| 165 int /* thread_id */, | 177 int /* thread_id */, |
| 166 int /* request_id */, | 178 int /* request_id */, |
| 167 std::string /* device_instance_id */, | 179 std::string /* device_instance_id */, |
| 168 std::string /* service_uuid */) | 180 std::string /* service_uuid */) |
| 181 | |
| 182 // Gets a GATT Characteristic from a bluetooth device. | |
|
Jeffrey Yasskin
2015/06/02 22:12:29
s/from a bluetooth device/within a GATT Service/?
ortuno
2015/06/03 20:27:23
Done.
| |
| 183 IPC_MESSAGE_CONTROL4(BluetoothHostMsg_GetCharacteristic, | |
| 184 int /* thread_id */, | |
| 185 int /* request_id */, | |
| 186 std::string /* service_instance_id */, | |
| 187 std::string /* characteristic_uuid */) | |
| OLD | NEW |