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

Unified Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h

Issue 2761993002: cros: Eliminate bluetooth methods from SystemTrayDelegate (Closed)
Patch Set: review comments Created 3 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: 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..6add0d71e66a8fdfd0e47aa44ce11842cc8a39cb 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,29 @@ 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);
// 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);
-
- // Returns true if bluetooth adapter is discovering bluetooth devices.
- bool IsDiscovering() const;
+ void ConnectToBluetoothDevice(const std::string& address);
// 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,
« no previous file with comments | « ash/common/system/chromeos/bluetooth/tray_bluetooth.cc ('k') | ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698