Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6713)

Unified Diff: chrome/common/extensions/api/experimental_bluetooth.idl

Issue 10536159: Bluetooth Extension API: Add a discovery API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove chromeos/bluetooth code Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698