| 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/common/system/web_notification/web_notification_tray.h" | 5 #include "ash/common/system/web_notification/web_notification_tray.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
| 8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
| 9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/shelf/shelf_constants.h" | 10 #include "ash/common/shelf/shelf_constants.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 CreateVectorIcon(gfx::VectorIconId::NOTIFICATIONS, kNoUnreadIconSize, | 132 CreateVectorIcon(gfx::VectorIconId::NOTIFICATIONS, kNoUnreadIconSize, |
| 133 kWebNotificationColorNoUnread); | 133 kWebNotificationColorNoUnread); |
| 134 } | 134 } |
| 135 | 135 |
| 136 no_unread_icon_.SetImage(image); | 136 no_unread_icon_.SetImage(image); |
| 137 no_unread_icon_.set_owned_by_client(); | 137 no_unread_icon_.set_owned_by_client(); |
| 138 | 138 |
| 139 unread_label_.set_owned_by_client(); | 139 unread_label_.set_owned_by_client(); |
| 140 SetupLabelForTray(&unread_label_); | 140 SetupLabelForTray(&unread_label_); |
| 141 | 141 |
| 142 AddChildView(&unread_label_); | 142 AddChildView(&no_unread_icon_); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void SetBubbleVisible(bool visible) { | 145 void SetBubbleVisible(bool visible) { |
| 146 if (visible == is_bubble_visible_) | 146 if (visible == is_bubble_visible_) |
| 147 return; | 147 return; |
| 148 | 148 |
| 149 is_bubble_visible_ = visible; | 149 is_bubble_visible_ = visible; |
| 150 UpdateIconVisibility(); | 150 UpdateIconVisibility(); |
| 151 } | 151 } |
| 152 | 152 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 | 530 |
| 531 message_center::MessageCenterBubble* | 531 message_center::MessageCenterBubble* |
| 532 WebNotificationTray::GetMessageCenterBubbleForTest() { | 532 WebNotificationTray::GetMessageCenterBubbleForTest() { |
| 533 if (!message_center_bubble()) | 533 if (!message_center_bubble()) |
| 534 return NULL; | 534 return NULL; |
| 535 return static_cast<message_center::MessageCenterBubble*>( | 535 return static_cast<message_center::MessageCenterBubble*>( |
| 536 message_center_bubble()->bubble()); | 536 message_center_bubble()->bubble()); |
| 537 } | 537 } |
| 538 | 538 |
| 539 } // namespace ash | 539 } // namespace ash |
| OLD | NEW |