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

Unified Diff: device/bluetooth/bluetooth_adapter.h

Issue 180163009: chrome.bluetooth API improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review feedback, simplify threading model. Created 6 years, 9 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: device/bluetooth/bluetooth_adapter.h
diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h
index e713ff496befeeecac963358e8b3a465bdf99019..f46a4774d641f1c9460bbb535058043139fa9b26 100644
--- a/device/bluetooth/bluetooth_adapter.h
+++ b/device/bluetooth/bluetooth_adapter.h
@@ -35,15 +35,15 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> {
public:
virtual ~Observer() {}
- // Called when the presence of the adapter |adapter| changes, when
- // |present| is true the adapter is now present, false means the adapter
- // has been removed from the system.
+ // Called when the presence of the adapter |adapter| changes, when |present|
+ // is true the adapter is now present, false means the adapter has been
+ // removed from the system.
virtual void AdapterPresentChanged(BluetoothAdapter* adapter,
bool present) {}
- // Called when the radio power state of the adapter |adapter| changes,
- // when |powered| is true the adapter radio is powered, false means the
- // adapter radio is off.
+ // Called when the radio power state of the adapter |adapter| changes, when
+ // |powered| is true the adapter radio is powered, false means the adapter
+ // radio is off.
virtual void AdapterPoweredChanged(BluetoothAdapter* adapter,
bool powered) {}
@@ -53,9 +53,9 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> {
virtual void AdapterDiscoverableChanged(BluetoothAdapter* adapter,
bool discoverable) {}
- // Called when the discovering state of the adapter |adapter| changes,
- // when |discovering| is true the adapter is seeking new devices, false
- // means it is not.
+ // Called when the discovering state of the adapter |adapter| changes, when
+ // |discovering| is true the adapter is seeking new devices, false means it
+ // is not.
virtual void AdapterDiscoveringChanged(BluetoothAdapter* adapter,
bool discovering) {}
@@ -78,8 +78,8 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> {
BluetoothDevice* device) {}
};
- // The ErrorCallback is used for methods that can fail in which case it
- // is called, in the success case the callback is simply not called.
+ // The ErrorCallback is used for methods that can fail in which case it is
+ // called, in the success case the callback is simply not called.
typedef base::Closure ErrorCallback;
// The BluetoothOutOfBandPairingDataCallback is used to return
@@ -87,9 +87,9 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> {
typedef base::Callback<void(const BluetoothOutOfBandPairingData& data)>
BluetoothOutOfBandPairingDataCallback;
- // Adds and removes observers for events on this bluetooth adapter,
- // if monitoring multiple adapters check the |adapter| parameter of
- // observer methods to determine which adapter is issuing the event.
+ // Adds and removes observers for events on this bluetooth adapter, if
+ // monitoring multiple adapters check the |adapter| parameter of observer
+ // methods to determine which adapter is issuing the event.
virtual void AddObserver(BluetoothAdapter::Observer* observer) = 0;
virtual void RemoveObserver(
BluetoothAdapter::Observer* observer) = 0;
@@ -110,9 +110,9 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> {
// Indicates whether the adapter is initialized and ready to use.
virtual bool IsInitialized() const = 0;
- // Indicates whether the adapter is actually present on the system, for
- // the default adapter this indicates whether any adapter is present. An
- // adapter is only considered present if the address has been obtained.
+ // Indicates whether the adapter is actually present on the system, for the
+ // default adapter this indicates whether any adapter is present. An adapter
+ // is only considered present if the address has been obtained.
virtual bool IsPresent() const = 0;
// Indicates whether the adapter radio is powered.
@@ -161,16 +161,16 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> {
virtual void StartDiscoverySession(const DiscoverySessionCallback& callback,
const ErrorCallback& error_callback);
- // Requests the list of devices from the adapter, all are returned
- // including those currently connected and those paired. Use the
- // returned device pointers to determine which they are.
+ // Requests the list of devices from the adapter, all are returned including
+ // those currently connected and those paired. Use the returned device
+ // pointers to determine which they are.
typedef std::vector<BluetoothDevice*> DeviceList;
virtual DeviceList GetDevices();
typedef std::vector<const BluetoothDevice*> ConstDeviceList;
virtual ConstDeviceList GetDevices() const;
- // Returns a pointer to the device with the given address |address| or
- // NULL if no such device is known.
+ // Returns a pointer to the device with the given address |address| or NULL if
+ // no such device is known.
virtual BluetoothDevice* GetDevice(const std::string& address);
virtual const BluetoothDevice* GetDevice(
const std::string& address) const;
@@ -269,9 +269,9 @@ class BluetoothAdapter : public base::RefCounted<BluetoothAdapter> {
BluetoothDiscoverySession* discovery_session);
// Devices paired with, connected to, discovered by, or visible to the
- // adapter. The key is the Bluetooth address of the device and the value
- // is the BluetoothDevice object whose lifetime is managed by the
- // adapter instance.
+ // adapter. The key is the Bluetooth address of the device and the value is
+ // the BluetoothDevice object whose lifetime is managed by the adapter
+ // instance.
typedef std::map<const std::string, BluetoothDevice*> DevicesMap;
DevicesMap devices_;

Powered by Google App Engine
This is Rietveld 408576698