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

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: Minor fix 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..1f39fb8d8370d3894f94c0e6971c086e6f74cd1d 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();
- return login_status != user::LOGGED_IN_NONE
- && login_status != user::LOGGED_IN_LOCKED;
+ return login_status != user::LOGGED_IN_NONE &&
+ login_status != user::LOGGED_IN_LOCKED &&
+ ash::Shell::GetInstance()
+ ->session_state_delegate()
+ ->GetSessionState() !=
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY;
}
message_center::MessageCenterTray* WebNotificationTray::GetMessageCenterTray() {
@@ -457,9 +461,12 @@ void WebNotificationTray::UpdateTrayContent() {
button_->SetState(views::CustomButton::STATE_PRESSED);
else
button_->SetState(views::CustomButton::STATE_NORMAL);
- SetVisible((status_area_widget()->login_status() != user::LOGGED_IN_NONE) &&
- (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) &&
- (message_center->NotificationCount() > 0));
+ SetVisible(
+ (status_area_widget()->login_status() != user::LOGGED_IN_NONE) &&
+ (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) &&
+ (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() !=
+ ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY) &&
+ (message_center->NotificationCount() > 0));
Layout();
SchedulePaint();
}

Powered by Google App Engine
This is Rietveld 408576698