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

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

Issue 2025613002: Reland: 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 24912a4a67dd1be39cb4c05708c41d46249a7a83..7aa1d5c9d441ab81e28a9ff14c4908bbfd68eb6d 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -305,9 +305,8 @@ void WebNotificationTray::HidePopups() {
// Private methods.
bool WebNotificationTray::ShouldShowMessageCenter() {
- return status_area_widget()->login_status() != user::LOGGED_IN_LOCKED &&
- !(status_area_widget()->system_tray() &&
- status_area_widget()->system_tray()->HasNotificationBubble());
+ return !(status_area_widget()->system_tray() &&
+ status_area_widget()->system_tray()->HasNotificationBubble());
}
bool WebNotificationTray::ShouldBlockShelfAutoHide() const {
@@ -330,6 +329,7 @@ void WebNotificationTray::ShowMessageCenterBubble() {
void WebNotificationTray::UpdateAfterLoginStatusChange(
user::LoginStatus login_status) {
+ message_center()->SetLockedState(login_status == user::LOGGED_IN_LOCKED);
OnMessageCenterTrayChanged();
}
@@ -412,8 +412,7 @@ bool WebNotificationTray::IsContextMenuEnabled() const {
->session_state_delegate()
->IsInSecondaryLoginScreen();
- return login_status != user::LOGGED_IN_NONE
- && login_status != user::LOGGED_IN_LOCKED && !userAddingRunning;
+ return login_status != user::LOGGED_IN_NONE && !userAddingRunning;
}
message_center::MessageCenterTray* WebNotificationTray::GetMessageCenterTray() {
@@ -481,7 +480,6 @@ void WebNotificationTray::UpdateTrayContent() {
->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