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

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: Fix test. 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 | chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc » ('j') | 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..bcb19192c4d59bc1899808a48e3efd20c3914499 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,11 @@ void WebNotificationTray::UpdateStatusIcon() {
tool_tip = l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_TOOLTIP);
}
+ if (message_center()->GetVisibleNotifications().empty()) {
+ DestroyStatusIcon();
+ return;
+ }
+
gfx::ImageSkia* icon_image = GetIcon(
unread_notifications,
message_center()->IsQuietMode());
« no previous file with comments | « no previous file | chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698