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

Side by Side Diff: device/bluetooth/bluetooth_adapter.h

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Cleanup Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // |discoverable| is true, then it will be discoverable by other Bluetooth 310 // |discoverable| is true, then it will be discoverable by other Bluetooth
311 // devices. On successfully changing the adapter's discoverability, |callback| 311 // devices. On successfully changing the adapter's discoverability, |callback|
312 // will be called. On failure, |error_callback| will be called. 312 // will be called. On failure, |error_callback| will be called.
313 virtual void SetDiscoverable(bool discoverable, 313 virtual void SetDiscoverable(bool discoverable,
314 const base::Closure& callback, 314 const base::Closure& callback,
315 const ErrorCallback& error_callback) = 0; 315 const ErrorCallback& error_callback) = 0;
316 316
317 // Indicates whether the adapter is currently discovering new devices. 317 // Indicates whether the adapter is currently discovering new devices.
318 virtual bool IsDiscovering() const = 0; 318 virtual bool IsDiscovering() const = 0;
319 319
320 // This function get add all the connected peripherals into |devices_|.
321 // TODO(crbug.com/653032): Needs to be implemented for Android, ChromeOS and
322 // Windows.
323 virtual void RetrievedConnectedPeripherals() {}
324
320 // Requests the adapter to start a new discovery session. On success, a new 325 // Requests the adapter to start a new discovery session. On success, a new
321 // instance of BluetoothDiscoverySession will be returned to the caller via 326 // instance of BluetoothDiscoverySession will be returned to the caller via
322 // |callback| and the adapter will be discovering nearby Bluetooth devices. 327 // |callback| and the adapter will be discovering nearby Bluetooth devices.
323 // The returned BluetoothDiscoverySession is owned by the caller and it's the 328 // The returned BluetoothDiscoverySession is owned by the caller and it's the
324 // owner's responsibility to properly clean it up and stop the session when 329 // owner's responsibility to properly clean it up and stop the session when
325 // device discovery is no longer needed. 330 // device discovery is no longer needed.
326 // 331 //
327 // If clients desire device discovery to run, they should always call this 332 // If clients desire device discovery to run, they should always call this
328 // method and never make it conditional on the value of IsDiscovering(), as 333 // method and never make it conditional on the value of IsDiscovering(), as
329 // another client might cause discovery to stop unexpectedly. Hence, clients 334 // another client might cause discovery to stop unexpectedly. Hence, clients
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 std::set<BluetoothDiscoverySession*> discovery_sessions_; 620 std::set<BluetoothDiscoverySession*> discovery_sessions_;
616 621
617 // Note: This should remain the last member so it'll be destroyed and 622 // Note: This should remain the last member so it'll be destroyed and
618 // invalidate its weak pointers before any other members are destroyed. 623 // invalidate its weak pointers before any other members are destroyed.
619 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; 624 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_;
620 }; 625 };
621 626
622 } // namespace device 627 } // namespace device
623 628
624 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 629 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698