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

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

Issue 2018063002: Revert of Show message center on lock screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | ui/message_center/fake_message_center.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5c102cc3f42bde44937df7f2c139fe4bda86603f..e8c9e70bc73f43388104dcc6546d6b0ba0f2b15a 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -302,8 +302,9 @@
// Private methods.
bool WebNotificationTray::ShouldShowMessageCenter() {
- return !(status_area_widget()->system_tray() &&
- status_area_widget()->system_tray()->HasNotificationBubble());
+ return status_area_widget()->login_status() != user::LOGGED_IN_LOCKED &&
+ !(status_area_widget()->system_tray() &&
+ status_area_widget()->system_tray()->HasNotificationBubble());
}
bool WebNotificationTray::ShouldBlockShelfAutoHide() const {
@@ -326,7 +327,6 @@
void WebNotificationTray::UpdateAfterLoginStatusChange(
user::LoginStatus login_status) {
- message_center()->SetLockedState(login_status == user::LOGGED_IN_LOCKED);
OnMessageCenterTrayChanged();
}
@@ -409,7 +409,8 @@
->session_state_delegate()
->IsInSecondaryLoginScreen();
- return login_status != user::LOGGED_IN_NONE && !userAddingRunning;
+ return login_status != user::LOGGED_IN_NONE
+ && login_status != user::LOGGED_IN_LOCKED && !userAddingRunning;
}
message_center::MessageCenterTray* WebNotificationTray::GetMessageCenterTray() {
@@ -477,6 +478,7 @@
->IsInSecondaryLoginScreen();
SetVisible((status_area_widget()->login_status() != user::LOGGED_IN_NONE) &&
+ (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) &&
!userAddingRunning);
Layout();
SchedulePaint();
« no previous file with comments | « no previous file | ui/message_center/fake_message_center.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698