Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |