Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
index 5aa7db32cee5c2f61dd98f244428df73f186895c..5f3fc5211d48726d2abbdc1d54fe5d4507ec1f59 100644 |
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
@@ -186,6 +186,40 @@ void OnAcceptMultiprofilesIntro(bool no_show_again) { |
UserAddingScreen::Get()->Start(); |
} |
+ash::BluetoothDeviceInfo::DeviceType GetBluetoothDeviceType( |
+ const device::BluetoothDevice* device) { |
+ switch (device->GetDeviceType()) { |
+ case device::BluetoothDevice::DEVICE_COMPUTER: |
+ return ash::BluetoothDeviceInfo::DEVICE_COMPUTER; |
+ case device::BluetoothDevice::DEVICE_PHONE: |
+ return ash::BluetoothDeviceInfo::DEVICE_PHONE; |
+ case device::BluetoothDevice::DEVICE_MODEM: |
+ return ash::BluetoothDeviceInfo::DEVICE_MODEM; |
+ case device::BluetoothDevice::DEVICE_AUDIO: |
+ return ash::BluetoothDeviceInfo::DEVICE_AUDIO; |
+ case device::BluetoothDevice::DEVICE_CAR_AUDIO: |
+ return ash::BluetoothDeviceInfo::DEVICE_CAR_AUDIO; |
+ case device::BluetoothDevice::DEVICE_VIDEO: |
+ return ash::BluetoothDeviceInfo::DEVICE_VIDEO; |
+ case device::BluetoothDevice::DEVICE_PERIPHERAL: |
+ return ash::BluetoothDeviceInfo::DEVICE_PERIPHERAL; |
+ case device::BluetoothDevice::DEVICE_JOYSTICK: |
+ return ash::BluetoothDeviceInfo::DEVICE_JOYSTICK; |
+ case device::BluetoothDevice::DEVICE_GAMEPAD: |
+ return ash::BluetoothDeviceInfo::DEVICE_GAMEPAD; |
+ case device::BluetoothDevice::DEVICE_KEYBOARD: |
+ return ash::BluetoothDeviceInfo::DEVICE_KEYBOARD; |
+ case device::BluetoothDevice::DEVICE_MOUSE: |
+ return ash::BluetoothDeviceInfo::DEVICE_MOUSE; |
+ case device::BluetoothDevice::DEVICE_TABLET: |
+ return ash::BluetoothDeviceInfo::DEVICE_TABLET; |
+ case device::BluetoothDevice::DEVICE_KEYBOARD_MOUSE_COMBO: |
+ return ash::BluetoothDeviceInfo::DEVICE_KEYBOARD_MOUSE_COMBO; |
+ default: |
+ return ash::BluetoothDeviceInfo::DEVICE_UNKNOWN; |
oshima
2016/04/27 20:31:27
ash can depends on /chromeos
What's the reason to
jennyz
2016/04/27 23:27:38
ditto oshima's comment.
fukino
2016/04/28 00:02:26
In the Patch Set 1 of this CL, I directly referred
|
+ } |
+} |
+ |
} // namespace |
SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() |
@@ -627,6 +661,7 @@ void SystemTrayDelegateChromeOS::GetAvailableBluetoothDevices( |
ash::BluetoothDeviceInfo info; |
info.address = device->GetAddress(); |
info.display_name = device->GetName(); |
+ info.device_type = GetBluetoothDeviceType(device); |
info.connected = device->IsConnected(); |
info.connecting = device->IsConnecting(); |
info.paired = device->IsPaired(); |