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

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

Issue 10915148: Change getDevices to use a DeviceCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test breakage Created 8 years, 3 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 7d3fe41751043d907235765676b4471f115e985f..9a00980bc3cdcc591403310ed9c10f86419e49fa 100644
--- a/chrome/common/extensions/api/experimental_bluetooth.idl
+++ b/chrome/common/extensions/api/experimental_bluetooth.idl
@@ -71,6 +71,11 @@ namespace experimental.bluetooth {
// Only devices providing a service with a name that matches |name| will be
// returned.
DOMString? name;
+
+ // Called for each matching device. Note that a service discovery request
+ // must be made to each non-matching device before it can be definitively
+ // excluded. This can take some time.
+ DeviceCallback deviceCallback;
};
// Options for the getServices function.
@@ -148,12 +153,15 @@ namespace experimental.bluetooth {
// there is no adapater available.
static void getName(NameCallback callback);
- // Get a list of Bluetooth devices.
- // NOTE: This API is likely to change. Please see crbug.com/134545
- // |options| : Controls which devices are returned.
- // |callback| : Called with an array of Device objects.
+ // Get a bluetooth devices known to the system. Known devices are either
+ // currently bonded, or have been bonded in the past.
+ // |options| : Controls which devices are returned and provides
+ // |deviceCallback|, which is called for each matching device.
+ // |callback| : Called when the search is completed.
+ // |options.deviceCallback| will not be called after
+ // |callback| has been called.
static void getDevices(GetDevicesOptions options,
- DevicesCallback callback);
+ ResultCallback callback);
// Get a list of services provided by a device.
static void getServices(GetServicesOptions options,

Powered by Google App Engine
This is Rietveld 408576698