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

Unified Diff: ash/system/status_area_widget.cc

Issue 10824153: Change Ash web notification behavior (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang Created 8 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
« no previous file with comments | « ash/system/status_area_widget.h ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/status_area_widget.cc
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index 7c80c7ac8643e167e6bce09db99fb667705b7d95..0729190acd9bcd61b89cf8a4e47a5d07aa7f41a9 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -298,7 +298,7 @@ StatusAreaWidget::~StatusAreaWidget() {
void StatusAreaWidget::CreateTrayViews(ShellDelegate* shell_delegate) {
AddWebNotificationTray(new WebNotificationTray(this));
- AddSystemTray(new SystemTray(), shell_delegate);
+ AddSystemTray(new SystemTray(this), shell_delegate);
}
void StatusAreaWidget::Shutdown() {
@@ -351,27 +351,18 @@ void StatusAreaWidget::SetPaintsBackground(
web_notification_tray_->SetPaintsBackground(value, change_type);
}
-void StatusAreaWidget::ShowWebNotificationBubble(UserAction user_action) {
- if (system_tray_ && system_tray_->IsBubbleVisible()) {
- // User actions should always hide the system tray bubble first.
- DCHECK(user_action != USER_ACTION);
- // Don't immediately show the web notification bubble if the system tray
- // bubble is visible.
- return;
- }
- DCHECK(web_notification_tray_);
- web_notification_tray_->ShowBubble();
- // Disable showing system notifications while viewing web notifications.
- if (system_tray_)
- system_tray_->SetHideNotifications(true);
+void StatusAreaWidget::HideNonSystemNotifications() {
+ if (web_notification_tray_)
+ web_notification_tray_->HideNotificationBubble();
}
-void StatusAreaWidget::HideWebNotificationBubble() {
- DCHECK(web_notification_tray_);
- web_notification_tray_->HideBubble();
- // Show any hidden or suppressed system notifications.
+void StatusAreaWidget::SetHideSystemNotifications(bool hide) {
if (system_tray_)
- system_tray_->SetHideNotifications(false);
+ system_tray_->SetHideNotifications(hide);
+}
+
+bool StatusAreaWidget::ShouldShowNonSystemNotifications() {
+ return !(system_tray_ && system_tray_->IsAnyBubbleVisible());
}
void StatusAreaWidget::UpdateAfterLoginStatusChange(
« no previous file with comments | « ash/system/status_area_widget.h ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698