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

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

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)
Patch Set: Adding BluetoothAdapter::RetrievedConnectedPeripherals() and the implementation in BluetoothAdapter… 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // |discoverable| is true, then it will be discoverable by other Bluetooth 313 // |discoverable| is true, then it will be discoverable by other Bluetooth
314 // devices. On successfully changing the adapter's discoverability, |callback| 314 // devices. On successfully changing the adapter's discoverability, |callback|
315 // will be called. On failure, |error_callback| will be called. 315 // will be called. On failure, |error_callback| will be called.
316 virtual void SetDiscoverable(bool discoverable, 316 virtual void SetDiscoverable(bool discoverable,
317 const base::Closure& callback, 317 const base::Closure& callback,
318 const ErrorCallback& error_callback) = 0; 318 const ErrorCallback& error_callback) = 0;
319 319
320 // Indicates whether the adapter is currently discovering new devices. 320 // Indicates whether the adapter is currently discovering new devices.
321 virtual bool IsDiscovering() const = 0; 321 virtual bool IsDiscovering() const = 0;
322 322
323 // This function get add all the connected peripherals into |devices_|.
ortuno 2016/09/28 23:15:52 Could you open an issue and add a TODO for impleme
jlebel 2016/10/05 14:09:41 Done.
324 virtual void RetrievedConnectedPeripherals() {}
325
323 // Requests the adapter to start a new discovery session. On success, a new 326 // Requests the adapter to start a new discovery session. On success, a new
324 // instance of BluetoothDiscoverySession will be returned to the caller via 327 // instance of BluetoothDiscoverySession will be returned to the caller via
325 // |callback| and the adapter will be discovering nearby Bluetooth devices. 328 // |callback| and the adapter will be discovering nearby Bluetooth devices.
326 // The returned BluetoothDiscoverySession is owned by the caller and it's the 329 // The returned BluetoothDiscoverySession is owned by the caller and it's the
327 // owner's responsibility to properly clean it up and stop the session when 330 // owner's responsibility to properly clean it up and stop the session when
328 // device discovery is no longer needed. 331 // device discovery is no longer needed.
329 // 332 //
330 // If clients desire device discovery to run, they should always call this 333 // If clients desire device discovery to run, they should always call this
331 // method and never make it conditional on the value of IsDiscovering(), as 334 // method and never make it conditional on the value of IsDiscovering(), as
332 // another client might cause discovery to stop unexpectedly. Hence, clients 335 // another client might cause discovery to stop unexpectedly. Hence, clients
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 std::set<BluetoothDiscoverySession*> discovery_sessions_; 627 std::set<BluetoothDiscoverySession*> discovery_sessions_;
625 628
626 // Note: This should remain the last member so it'll be destroyed and 629 // Note: This should remain the last member so it'll be destroyed and
627 // invalidate its weak pointers before any other members are destroyed. 630 // invalidate its weak pointers before any other members are destroyed.
628 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; 631 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_;
629 }; 632 };
630 633
631 } // namespace device 634 } // namespace device
632 635
633 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 636 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_adapter_mac.h » ('j') | device/bluetooth/bluetooth_adapter_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698