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

Unified Diff: ash/system/web_notification/web_notification_tray.cc

Issue 357323002: Tray elements behave appropriately on the multiple signin screen (more like lock screen) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stored result of check on multiple signin screen to local variable Created 6 years, 5 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
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 554d60e6ae2b3cd75aa6febdf1fd148b4d375ed1..f4b227ab83838521a172f8e02da180f86cec0d07 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -393,8 +393,12 @@ bool WebNotificationTray::ShowNotifierSettings() {
bool WebNotificationTray::IsContextMenuEnabled() const {
user::LoginStatus login_status = status_area_widget()->login_status();
+ bool userAddingRunning =
+ (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
+
return login_status != user::LOGGED_IN_NONE
- && login_status != user::LOGGED_IN_LOCKED;
+ && login_status != user::LOGGED_IN_LOCKED && !userAddingRunning;
}
message_center::MessageCenterTray* WebNotificationTray::GetMessageCenterTray() {
@@ -457,9 +461,13 @@ void WebNotificationTray::UpdateTrayContent() {
button_->SetState(views::CustomButton::STATE_PRESSED);
else
button_->SetState(views::CustomButton::STATE_NORMAL);
+ bool userAddingRunning =
+ (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
+
SetVisible((status_area_widget()->login_status() != user::LOGGED_IN_NONE) &&
(status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) &&
- (message_center->NotificationCount() > 0));
+ !userAddingRunning && (message_center->NotificationCount() > 0));
Layout();
SchedulePaint();
}

Powered by Google App Engine
This is Rietveld 408576698