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

Unified Diff: chrome/browser/ui/views/message_center/web_notification_tray.cc

Issue 459123002: Remove status icon if there are no more notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/message_center/web_notification_tray.cc
diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.cc b/chrome/browser/ui/views/message_center/web_notification_tray.cc
index 473468cffe7f5c5049a5c9f91c0c34dd731ab459..8b61c4369c0206f692cd11441e0ae937c098c72d 100644
--- a/chrome/browser/ui/views/message_center/web_notification_tray.cc
+++ b/chrome/browser/ui/views/message_center/web_notification_tray.cc
@@ -276,6 +276,13 @@ void WebNotificationTray::UpdateStatusIcon() {
tool_tip = l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_TOOLTIP);
}
+ int visible_notifications =
+ message_center()->GetVisibleNotifications().size();
+ if (visible_notifications == 0) {
Jun Mukai 2014/08/11 19:13:40 Why not simply if (message_center()->GetVisibleNot
dewittj 2014/08/11 19:51:24 Done.
+ DestroyStatusIcon();
+ return;
+ }
+
gfx::ImageSkia* icon_image = GetIcon(
unread_notifications,
message_center()->IsQuietMode());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698