Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "ash/system/bluetooth/tray_bluetooth.h" | 5 #include "ash/system/bluetooth/tray_bluetooth.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 // present, also add a section header above the unpaired devices. | 307 // present, also add a section header above the unpaired devices. |
| 308 if (discovered_not_paired_devices_.size() > 0) { | 308 if (discovered_not_paired_devices_.size() > 0) { |
| 309 if (num_paired_devices > 0) | 309 if (num_paired_devices > 0) |
| 310 AddScrollListSubHeader(IDS_ASH_STATUS_TRAY_BLUETOOTH_UNPAIRED_DEVICES); | 310 AddScrollListSubHeader(IDS_ASH_STATUS_TRAY_BLUETOOTH_UNPAIRED_DEVICES); |
| 311 AppendSameTypeDevicesToScrollList(discovered_not_paired_devices_, false, | 311 AppendSameTypeDevicesToScrollList(discovered_not_paired_devices_, false, |
| 312 false, bluetooth_enabled); | 312 false, bluetooth_enabled); |
| 313 } | 313 } |
| 314 | 314 |
| 315 // Show user Bluetooth state if there is no bluetooth devices in list. | 315 // Show user Bluetooth state if there is no bluetooth devices in list. |
| 316 if (device_map_.size() == 0 && bluetooth_available && bluetooth_enabled) { | 316 if (device_map_.size() == 0 && bluetooth_available && bluetooth_enabled) { |
| 317 scroll_content()->AddChildView( | 317 scroll_content()->AddChildView(new TrayDetailsView::InfoLabel( |
| 318 new InfoLabel(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING)); | 318 IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING, |
| 319 nullptr /* InfoLabelDelegate */)); | |
|
Kyle Horimoto
2017/07/10 18:37:07
The comment should be the parameter name, not its
lesliewatkins
2017/07/12 21:49:49
Done.
| |
| 319 } | 320 } |
| 320 | 321 |
| 321 // Focus the device which was focused before the device-list update. | 322 // Focus the device which was focused before the device-list update. |
| 322 if (!focused_device_address.empty()) | 323 if (!focused_device_address.empty()) |
| 323 FocusDeviceByAddress(focused_device_address); | 324 FocusDeviceByAddress(focused_device_address); |
| 324 | 325 |
| 325 scroll_content()->InvalidateLayout(); | 326 scroll_content()->InvalidateLayout(); |
| 326 } | 327 } |
| 327 | 328 |
| 328 void AppendSameTypeDevicesToScrollList(const BluetoothDeviceList& list, | 329 void AppendSameTypeDevicesToScrollList(const BluetoothDeviceList& list, |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 detailed_->Update(); | 571 detailed_->Update(); |
| 571 } | 572 } |
| 572 | 573 |
| 573 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 574 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 574 if (!detailed_) | 575 if (!detailed_) |
| 575 return; | 576 return; |
| 576 detailed_->Update(); | 577 detailed_->Update(); |
| 577 } | 578 } |
| 578 | 579 |
| 579 } // namespace ash | 580 } // namespace ash |
| OLD | NEW |