Chromium Code Reviews| Index: chrome/common/extensions/api/experimental_bluetooth.idl |
| diff --git a/chrome/common/extensions/api/experimental_bluetooth.idl b/chrome/common/extensions/api/experimental_bluetooth.idl |
| index f7408eb2ca7259b326b51984d354be5188be0aaa..23a1d9b80a48bf442f2b82f91c09e67e7e38c5d7 100644 |
| --- a/chrome/common/extensions/api/experimental_bluetooth.idl |
| +++ b/chrome/common/extensions/api/experimental_bluetooth.idl |
| @@ -101,6 +101,14 @@ |
| DOMString address, |
| OutOfBandPairingData data, |
| optional ResultCallback callback); |
| + |
| + // Start discovery. Discovered devices will be returned via the |
| + // onDeviceDiscovered event. Note that discovery can be resource |
| + // intensive. stopDiscovery should be called as soon as is convenient. |
| + static void startDiscovery(); |
|
asargent_no_longer_on_chrome
2012/06/14 18:23:55
FYI, another approach we could take is to have thi
|
| + |
| + // Stop discovery. |
| + static void stopDiscovery(); |
|
asargent_no_longer_on_chrome
2012/06/14 18:23:55
nit: startDiscovery and stopDiscovery should proba
|
| }; |
| interface Events { |
| @@ -108,6 +116,11 @@ |
| // |available| : True if bluetooth is available, false otherwise. |
| static void onAvailabilityChanged(boolean available); |
| + // Fired when a new device is discovered. This event will only be fired |
| + // after a call to startDiscovery(), and before any subsequent call to |
| + // stopDiscovery(). |
| + static void onDeviceDiscovered(Device device); |
| + |
| // Fired when the power state of bluetooth on the system changes. |
| // |powered| : True if bluetooth is powered, false otherwise. |
| static void onPowerChanged(boolean has_power); |