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

Side by Side Diff: ui/message_center/message_center_tray.cc

Issue 1961793002: Show the unread button even without any unread notifications (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 unified diff | Download patch
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/message_center_tray.h" 5 #include "ui/message_center/message_center_tray.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 void MessageCenterTray::OnQuietModeChanged(bool in_quiet_mode) { 252 void MessageCenterTray::OnQuietModeChanged(bool in_quiet_mode) {
253 NotifyMessageCenterTrayChanged(); 253 NotifyMessageCenterTrayChanged();
254 } 254 }
255 255
256 void MessageCenterTray::OnBlockingStateChanged(NotificationBlocker* blocker) { 256 void MessageCenterTray::OnBlockingStateChanged(NotificationBlocker* blocker) {
257 OnMessageCenterChanged(); 257 OnMessageCenterChanged();
258 } 258 }
259 259
260 void MessageCenterTray::OnMessageCenterChanged() { 260 void MessageCenterTray::OnMessageCenterChanged() {
261 if (message_center_visible_ && message_center_->NotificationCount() == 0)
262 HideMessageCenterBubble();
dewittj 2016/05/09 16:27:52 This change isn't reflected in the CL description
yoshiki 2016/05/10 03:52:07 I thought it was intended. But per PM discussion,
263
264 if (popups_visible_ && !message_center_->HasPopupNotifications()) 261 if (popups_visible_ && !message_center_->HasPopupNotifications())
265 HidePopupBubbleInternal(); 262 HidePopupBubbleInternal();
266 else if (!popups_visible_ && message_center_->HasPopupNotifications()) 263 else if (!popups_visible_ && message_center_->HasPopupNotifications())
267 ShowPopupBubble(); 264 ShowPopupBubble();
268 265
269 NotifyMessageCenterTrayChanged(); 266 NotifyMessageCenterTrayChanged();
270 } 267 }
271 268
272 void MessageCenterTray::NotifyMessageCenterTrayChanged() { 269 void MessageCenterTray::NotifyMessageCenterTrayChanged() {
273 delegate_->OnMessageCenterTrayChanged(); 270 delegate_->OnMessageCenterTrayChanged();
274 } 271 }
275 272
276 } // namespace message_center 273 } // namespace message_center
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698