diff options
Diffstat (limited to 'ash/system/web_notification')
-rw-r--r-- | ash/system/web_notification/web_notification_tray.cc | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index 541f213..65e0a83 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -331,14 +331,6 @@ bool WebNotificationTray::ShouldShowQuietModeMenu(const ui::Event& event) { void WebNotificationTray::UpdateAfterLoginStatusChange( user::LoginStatus login_status) { - if (message_center::IsRichNotificationEnabled()) { - // The status icon should be always visible except for lock screen / login - // screen, to allow quiet mode and settings. This is valid only when rich - // notification is enabled, since old UI doesn't have settings. - SetVisible((login_status != user::LOGGED_IN_NONE) && - (login_status != user::LOGGED_IN_LOCKED)); - } - if (login_status == user::LOGGED_IN_LOCKED) { show_message_center_on_unlock_ = message_center_tray_->HideMessageCenterBubble(); @@ -350,6 +342,7 @@ void WebNotificationTray::UpdateAfterLoginStatusChange( message_center_tray_->ShowMessageCenterBubble(); show_message_center_on_unlock_ = false; } + OnMessageCenterTrayChanged(); } bool WebNotificationTray::ShouldBlockLauncherAutoHide() const { @@ -486,17 +479,9 @@ void WebNotificationTray::UpdateTrayContent() { button_->SetState(views::CustomButton::STATE_PRESSED); else button_->SetState(views::CustomButton::STATE_NORMAL); - // Change the visibility of the buttons here when rich notifications are not - // enabled. If rich notifications are enabled, the visibility is changed at - // UpdateAfterLoginStatusChange() since the visibility won't depend on the - // number of notifications. - if (!message_center::IsRichNotificationEnabled()) { - 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); - } + SetVisible((status_area_widget()->login_status() != user::LOGGED_IN_NONE) && + (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) && + (message_center->NotificationCount() > 0)); Layout(); SchedulePaint(); } |