OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/system/web_notification/web_notification_tray.h" | 5 #include "ash/system/web_notification/web_notification_tray.h" |
6 | 6 |
7 #include "ash/system/status_area_widget.h" | 7 #include "ash/system/status_area_widget.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "ash/system/tray/tray_bubble_view.h" | 9 #include "ash/system/tray/tray_bubble_view.h" |
10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 for (WebNotificationList::Notifications::const_iterator iter = | 600 for (WebNotificationList::Notifications::const_iterator iter = |
601 notifications.begin(); iter != notifications.end(); ++iter) { | 601 notifications.begin(); iter != notifications.end(); ++iter) { |
602 WebNotificationView* view = new WebNotificationView(tray_, *iter); | 602 WebNotificationView* view = new WebNotificationView(tray_, *iter); |
603 scroll_content_->AddChildView(view); | 603 scroll_content_->AddChildView(view); |
604 if (++num_children >= kMaxVisibleNotifications) | 604 if (++num_children >= kMaxVisibleNotifications) |
605 break; | 605 break; |
606 } | 606 } |
607 if (num_children == 0) { | 607 if (num_children == 0) { |
608 views::Label* label = new views::Label(l10n_util::GetStringUTF16( | 608 views::Label* label = new views::Label(l10n_util::GetStringUTF16( |
609 IDS_ASH_WEB_NOTFICATION_TRAY_NO_MESSAGES)); | 609 IDS_ASH_WEB_NOTFICATION_TRAY_NO_MESSAGES)); |
610 label->SetFont(label->font().DeriveFont(2)); | 610 label->SetFont(label->font().DeriveFont(1)); |
611 label->SetHorizontalAlignment(views::Label::ALIGN_CENTER); | 611 label->SetHorizontalAlignment(views::Label::ALIGN_CENTER); |
| 612 label->SetEnabledColor(SK_ColorGRAY); |
612 scroll_content_->AddChildView(label); | 613 scroll_content_->AddChildView(label); |
613 button_view_->SetCloseAllVisible(false); | 614 button_view_->SetCloseAllVisible(false); |
614 } else { | 615 } else { |
615 button_view_->SetCloseAllVisible(true); | 616 button_view_->SetCloseAllVisible(true); |
616 } | 617 } |
617 SizeScrollContent(); | 618 SizeScrollContent(); |
618 Layout(); | 619 Layout(); |
619 GetWidget()->GetRootView()->SchedulePaint(); | 620 GetWidget()->GetRootView()->SchedulePaint(); |
620 } | 621 } |
621 | 622 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 | 1043 |
1043 void WebNotificationTray::HideBubble(Bubble* bubble) { | 1044 void WebNotificationTray::HideBubble(Bubble* bubble) { |
1044 if (bubble == message_center_bubble()) { | 1045 if (bubble == message_center_bubble()) { |
1045 HideMessageCenterBubble(); | 1046 HideMessageCenterBubble(); |
1046 } else if (bubble == notification_bubble()) { | 1047 } else if (bubble == notification_bubble()) { |
1047 HideNotificationBubble(); | 1048 HideNotificationBubble(); |
1048 } | 1049 } |
1049 } | 1050 } |
1050 | 1051 |
1051 } // namespace ash | 1052 } // namespace ash |
OLD | NEW |