From d7e52df1e84471b61a46cafad28caf908fd5942e Mon Sep 17 00:00:00 2001 From: "mukai@chromium.org" Date: Tue, 12 Nov 2013 18:57:32 +0000 Subject: Updates the web_notification_tray visibility when login status is changed. BUG=313850 R=stevenjb@chromium.org Review URL: https://codereview.chromium.org/67623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234588 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/system/status_area_widget.cc | 2 ++ ash/system/web_notification/web_notification_tray.cc | 5 +++++ ash/system/web_notification/web_notification_tray.h | 3 +++ 3 files changed, 10 insertions(+) diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc index ed7e708..19649b1 100644 --- a/ash/system/status_area_widget.cc +++ b/ash/system/status_area_widget.cc @@ -142,6 +142,8 @@ void StatusAreaWidget::UpdateAfterLoginStatusChange( login_status_ = login_status; if (system_tray_) system_tray_->UpdateAfterLoginStatusChange(login_status); + if (web_notification_tray_) + web_notification_tray_->UpdateAfterLoginStatusChange(login_status); if (logout_button_tray_) logout_button_tray_->UpdateAfterLoginStatusChange(login_status); } diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc index 53a381b..09e615e 100644 --- a/ash/system/web_notification/web_notification_tray.cc +++ b/ash/system/web_notification/web_notification_tray.cc @@ -446,6 +446,11 @@ void WebNotificationTray::ShowMessageCenterBubble() { message_center_tray_->ShowMessageCenterBubble(); } +void WebNotificationTray::UpdateAfterLoginStatusChange( + user::LoginStatus login_status) { + OnMessageCenterTrayChanged(); +} + void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) { if (alignment == shelf_alignment()) return; diff --git a/ash/system/web_notification/web_notification_tray.h b/ash/system/web_notification/web_notification_tray.h index 25a236c..e08afbc 100644 --- a/ash/system/web_notification/web_notification_tray.h +++ b/ash/system/web_notification/web_notification_tray.h @@ -74,6 +74,9 @@ class ASH_EXPORT WebNotificationTray // Shows the message center bubble. void ShowMessageCenterBubble(); + // Called when the login status is changed. + void UpdateAfterLoginStatusChange(user::LoginStatus login_status); + // Overridden from TrayBackgroundView. virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; virtual void AnchorUpdated() OVERRIDE; -- cgit v1.1