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

Unified Diff: ash/system/tray/system_tray.cc

Issue 12260046: Show notification when activating with no connection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index c5d165a45af997f90119e83415dba32b92dd5e3b..85e3ecbc2776c11dc921a40ef47978a13c4370ca 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -395,36 +395,16 @@ void SystemTray::ShowItems(const std::vector<SystemTrayItem*>& items,
}
void SystemTray::UpdateNotificationBubble() {
- // Only show the notification buble if we have notifications and we are not
- // showing the default bubble.
- if (notification_items_.empty() ||
- HasSystemBubbleType(SystemTrayBubble::BUBBLE_TYPE_DEFAULT)) {
+ // Only show the notification buble if we have notifications.
+ if (notification_items_.empty()) {
DestroyNotificationBubble();
return;
}
// Destroy the existing bubble before constructing a new one.
notification_bubble_.reset();
SystemTrayBubble* notification_bubble;
- if (HasSystemBubbleType(SystemTrayBubble::BUBBLE_TYPE_DETAILED)) {
- // Skip notifications for any currently displayed detailed item.
- std::vector<SystemTrayItem*> items;
- for (std::vector<SystemTrayItem*>::iterator iter =
- notification_items_.begin();
- iter != notification_items_.end(); ++ iter) {
- if (*iter != detailed_item_)
- items.push_back(*iter);
- }
- if (items.empty()) {
- DestroyNotificationBubble();
- return;
- }
- notification_bubble = new SystemTrayBubble(
- this, items, SystemTrayBubble::BUBBLE_TYPE_NOTIFICATION);
- } else {
- // Show all notifications.
- notification_bubble = new SystemTrayBubble(
- this, notification_items_, SystemTrayBubble::BUBBLE_TYPE_NOTIFICATION);
- }
+ notification_bubble = new SystemTrayBubble(
+ this, notification_items_, SystemTrayBubble::BUBBLE_TYPE_NOTIFICATION);
views::View* anchor;
TrayBubbleView::AnchorType anchor_type;
if (system_bubble_.get()) {

Powered by Google App Engine
This is Rietveld 408576698