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

Unified Diff: ash/system/bluetooth/tray_bluetooth.cc

Issue 2829763002: [Ash] Remove HoverHighlightView::AddLabelDeprecated() (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | ash/system/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/bluetooth/tray_bluetooth.cc
diff --git a/ash/system/bluetooth/tray_bluetooth.cc b/ash/system/bluetooth/tray_bluetooth.cc
index d5c5b3fb530b675b9004aef37cbe3c0424f99560..962a3ff82ccc38d29a64fc62f6fb488eab5e73a5 100644
--- a/ash/system/bluetooth/tray_bluetooth.cc
+++ b/ash/system/bluetooth/tray_bluetooth.cc
@@ -288,7 +288,7 @@ class BluetoothDetailedView : public TrayDetailsView {
return;
}
- // Add paired devices (and their section header in MD) in the list.
+ // Add paired devices and their section header to the list.
size_t num_paired_devices = connected_devices_.size() +
connecting_devices_.size() +
paired_not_connected_devices_.size();
@@ -302,7 +302,8 @@ class BluetoothDetailedView : public TrayDetailsView {
false, bluetooth_enabled);
}
- // Add paired devices (and their section header in MD) in the list.
+ // Add unpaired devices to the list. If at least one paired device is
+ // present, also add a section header above the unpaired devices.
if (discovered_not_paired_devices_.size() > 0) {
if (num_paired_devices > 0)
AddSubHeader(IDS_ASH_STATUS_TRAY_BLUETOOTH_UNPAIRED_DEVICES);
@@ -311,15 +312,9 @@ class BluetoothDetailedView : public TrayDetailsView {
}
// Show user Bluetooth state if there is no bluetooth devices in list.
- if (device_map_.size() == 0) {
- if (bluetooth_available && bluetooth_enabled) {
- HoverHighlightView* container = new HoverHighlightView(this);
- container->AddLabelDeprecated(
- l10n_util::GetStringUTF16(
- IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING),
- gfx::ALIGN_LEFT, false);
- scroll_content()->AddChildView(container);
- }
+ if (device_map_.size() == 0 && bluetooth_available && bluetooth_enabled) {
+ scroll_content()->AddChildView(TrayPopupUtils::CreateInfoLabelRowView(
+ IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERING));
}
// Focus the device which was focused before the device-list update.
« no previous file with comments | « no previous file | ash/system/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698