Index: ash/system/web_notification/web_notification_tray.cc |
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc |
index 5e7822fbb8d3c063863e94884f5916ff799a8a78..5f4401acf3683ff814250d327329978fb3fa7dbf 100644 |
--- a/ash/system/web_notification/web_notification_tray.cc |
+++ b/ash/system/web_notification/web_notification_tray.cc |
@@ -88,6 +88,7 @@ WebNotificationTray::WebNotificationTray( |
button_->set_triggerable_event_flags( |
ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON); |
tray_container()->AddChildView(button_); |
+ SetVisible(false); |
UpdateTray(); |
} |
@@ -198,6 +199,10 @@ void WebNotificationTray::UpdateAfterLoginStatusChange( |
ShowMessageCenterBubble(); |
show_message_center_on_unlock_ = false; |
} |
+ // The status icon should be always visible except for lock screen / login |
+ // screen, to allow quiet mode and settings. |
+ SetVisible((login_status != user::LOGGED_IN_NONE) && |
+ (login_status != user::LOGGED_IN_LOCKED)); |
UpdateTray(); |
} |
@@ -356,11 +361,6 @@ void WebNotificationTray::UpdateTray() { |
button_->SetState(views::CustomButton::STATE_PRESSED); |
else |
button_->SetState(views::CustomButton::STATE_NORMAL); |
- bool is_visible = |
- (status_area_widget()->login_status() != user::LOGGED_IN_NONE) && |
- (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) && |
- (message_center_->NotificationCount() > 0); |
- SetVisible(is_visible); |
Layout(); |
SchedulePaint(); |
} |