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

Unified Diff: ash/system/chromeos/tray_display.cc

Issue 1094863006: Put display messages as 'additional' message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 5 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/chromeos/tray_display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/tray_display.cc
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index 9a61897c174d0647dc6bbfa51834c166fced6819..83cad747e1fe9ac09b16d335f84061a2e4cb8469 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -334,10 +334,9 @@ bool TrayDisplay::GetDisplayMessageForNotification(
if (iter->second.configured_ui_scale() !=
old_iter->second.configured_ui_scale()) {
- *message_out = l10n_util::GetStringFUTF16(
+ *additional_message_out = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED,
- GetDisplayName(iter->first),
- GetDisplaySize(iter->first));
+ GetDisplayName(iter->first), GetDisplaySize(iter->first));
return true;
}
if (iter->second.rotation() != old_iter->second.rotation()) {
@@ -356,9 +355,8 @@ bool TrayDisplay::GetDisplayMessageForNotification(
rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_270;
break;
}
- *message_out = l10n_util::GetStringFUTF16(
- IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED,
- GetDisplayName(iter->first),
+ *additional_message_out = l10n_util::GetStringFUTF16(
+ IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetDisplayName(iter->first),
l10n_util::GetStringUTF16(rotation_text_id));
return true;
}
@@ -376,7 +374,7 @@ void TrayDisplay::CreateOrUpdateNotification(
message_center::MessageCenter::Get()->RemoveNotification(
kNotificationId, false /* by_user */);
- if (message.empty())
+ if (message.empty() && additional_message.empty())
return;
// Don't display notifications for accelerometer triggered screen rotations.
« no previous file with comments | « no previous file | ash/system/chromeos/tray_display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698