OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Use the <code>chrome.bluetoothPrivate</code> API to control the Bluetooth | 5 // Use the <code>chrome.bluetoothPrivate</code> API to control the Bluetooth |
6 // adapter state and handle device pairing. | 6 // adapter state and handle device pairing. |
7 // NOTE: This IDL is dependent on bluetooth.idl. | 7 // NOTE: This IDL is dependent on bluetooth.idl. |
8 | 8 |
9 [implemented_in = "extensions/browser/api/bluetooth/bluetooth_private_api.h"] | 9 [implemented_in = "extensions/browser/api/bluetooth/bluetooth_private_api.h", |
| 10 use_movable_types=true] |
10 | 11 |
11 namespace bluetoothPrivate { | 12 namespace bluetoothPrivate { |
12 // Events that can occur during pairing. The method used for pairing varies | 13 // Events that can occur during pairing. The method used for pairing varies |
13 // depending on the capability of the two devices. | 14 // depending on the capability of the two devices. |
14 enum PairingEventType { | 15 enum PairingEventType { |
15 // An alphanumeric PIN code is required to be entered by the user. | 16 // An alphanumeric PIN code is required to be entered by the user. |
16 requestPincode, | 17 requestPincode, |
17 | 18 |
18 // Display a PIN code to the user. | 19 // Display a PIN code to the user. |
19 displayPincode, | 20 displayPincode, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Pairs the given device. | 160 // Pairs the given device. |
160 static void pair(DOMString deviceAddress, optional VoidCallback callback); | 161 static void pair(DOMString deviceAddress, optional VoidCallback callback); |
161 }; | 162 }; |
162 | 163 |
163 interface Events { | 164 interface Events { |
164 // Fired when a pairing event occurs. | 165 // Fired when a pairing event occurs. |
165 // |pairingEvent|: A pairing event. | 166 // |pairingEvent|: A pairing event. |
166 [maxListeners=1] static void onPairing(PairingEvent pairingEvent); | 167 [maxListeners=1] static void onPairing(PairingEvent pairingEvent); |
167 }; | 168 }; |
168 }; | 169 }; |
OLD | NEW |