Chromium Code Reviews| Index: ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h |
| diff --git a/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h b/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h |
| index 239a8de8bce400c6341125201b0db38f3767a81e..3a19a2bf417fbfd8b23bc5c3c7380bc7476aabdb 100644 |
| --- a/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h |
| +++ b/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h |
| @@ -20,7 +20,22 @@ class BluetoothDiscoverySession; |
| namespace ash { |
| -struct BluetoothDeviceInfo; |
| +// TODO(jamescook): Convert TrayBlueooth to use device::BluetoothDevice and |
| +// delete this. http://crbug.com/660043 |
| +struct ASH_EXPORT BluetoothDeviceInfo { |
| + BluetoothDeviceInfo(); |
| + BluetoothDeviceInfo(const BluetoothDeviceInfo& other); |
| + ~BluetoothDeviceInfo(); |
| + |
| + std::string address; |
| + base::string16 display_name; |
| + bool connected; |
| + bool connecting; |
| + bool paired; |
| + device::BluetoothDeviceType device_type; |
| +}; |
| + |
| +using BluetoothDeviceList = std::vector<BluetoothDeviceInfo>; |
| // Maps UI concepts from the Bluetooth system tray (e.g. "Bluetooth is on") into |
| // device concepts ("Bluetooth adapter enabled"). Note that most Bluetooth |
| @@ -41,33 +56,33 @@ class ASH_EXPORT TrayBluetoothHelper |
| // Returns a list of available bluetooth devices. |
| // TODO(jamescook): Just return the list. |
| - void GetAvailableDevices(std::vector<BluetoothDeviceInfo>* list); |
| + void GetAvailableBluetoothDevices(std::vector<BluetoothDeviceInfo>* list); |
|
James Cook
2017/03/21 00:31:58
I renamed all these to make the code in TrayBlueto
msw
2017/03/21 01:54:43
I think your renaming is fine as-is.
|
| // Requests bluetooth start discovering devices, which happens asynchronously. |
| - void StartDiscovering(); |
| + void StartBluetoothDiscovering(); |
| // Requests bluetooth stop discovering devices. |
| - void StopDiscovering(); |
| + void StopBluetoothDiscovering(); |
| // Connect to a specific bluetooth device. |
| - void ConnectToDevice(const std::string& address); |
| + void ConnectToBluetoothDevice(const std::string& address); |
| // Returns true if bluetooth adapter is discovering bluetooth devices. |
| - bool IsDiscovering() const; |
| + bool IsBluetoothDiscovering() const; |
| // Toggles whether bluetooth is enabled. |
| - void ToggleEnabled(); |
| + void ToggleBluetoothEnabled(); |
| // Returns whether bluetooth capability is available (e.g. the device has |
| // hardware support). |
| - bool GetAvailable(); |
| + bool GetBluetoothAvailable(); |
| // Returns whether bluetooth is enabled. |
| - bool GetEnabled(); |
| + bool GetBluetoothEnabled(); |
| // Returns whether the delegate has initiated a bluetooth discovery session. |
| // TODO(jamescook): Why do we need both this and IsDiscovering()? |
| - bool HasDiscoverySession(); |
| + bool HasBluetoothDiscoverySession(); |
| // BluetoothAdapter::Observer: |
| void AdapterPresentChanged(device::BluetoothAdapter* adapter, |