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

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

Issue 11761032: Shows the notification icon during the login session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 | no next file » | 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 5e7822fbb8d3c063863e94884f5916ff799a8a78..5f4401acf3683ff814250d327329978fb3fa7dbf 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -88,6 +88,7 @@ WebNotificationTray::WebNotificationTray(
button_->set_triggerable_event_flags(
ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON);
tray_container()->AddChildView(button_);
+ SetVisible(false);
UpdateTray();
}
@@ -198,6 +199,10 @@ void WebNotificationTray::UpdateAfterLoginStatusChange(
ShowMessageCenterBubble();
show_message_center_on_unlock_ = false;
}
+ // The status icon should be always visible except for lock screen / login
+ // screen, to allow quiet mode and settings.
+ SetVisible((login_status != user::LOGGED_IN_NONE) &&
+ (login_status != user::LOGGED_IN_LOCKED));
UpdateTray();
}
@@ -356,11 +361,6 @@ void WebNotificationTray::UpdateTray() {
button_->SetState(views::CustomButton::STATE_PRESSED);
else
button_->SetState(views::CustomButton::STATE_NORMAL);
- bool is_visible =
- (status_area_widget()->login_status() != user::LOGGED_IN_NONE) &&
- (status_area_widget()->login_status() != user::LOGGED_IN_LOCKED) &&
- (message_center_->NotificationCount() > 0);
- SetVisible(is_visible);
Layout();
SchedulePaint();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698