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/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/status_area_widget.h" | 8 #include "ash/system/status_area_widget.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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (message_center_bubble()) { | 131 if (message_center_bubble()) { |
132 UpdateTray(); | 132 UpdateTray(); |
133 return; | 133 return; |
134 } | 134 } |
135 // Indicate that the message center is visible. Clears the unread count. | 135 // Indicate that the message center is visible. Clears the unread count. |
136 notification_list_->SetMessageCenterVisible(true); | 136 notification_list_->SetMessageCenterVisible(true); |
137 UpdateTray(); | 137 UpdateTray(); |
138 HidePopupBubble(); | 138 HidePopupBubble(); |
139 message_center_bubble_.reset(new MessageCenterBubble(this)); | 139 message_center_bubble_.reset(new MessageCenterBubble(this)); |
140 status_area_widget()->SetHideSystemNotifications(true); | 140 status_area_widget()->SetHideSystemNotifications(true); |
141 Shell::GetInstance()->shelf()->UpdateAutoHideState(); | 141 GetShelfLayoutManager()->UpdateAutoHideState(); |
142 } | 142 } |
143 | 143 |
144 void WebNotificationTray::HideMessageCenterBubble() { | 144 void WebNotificationTray::HideMessageCenterBubble() { |
145 if (!message_center_bubble()) | 145 if (!message_center_bubble()) |
146 return; | 146 return; |
147 message_center_bubble_.reset(); | 147 message_center_bubble_.reset(); |
148 show_message_center_on_unlock_ = false; | 148 show_message_center_on_unlock_ = false; |
149 notification_list_->SetMessageCenterVisible(false); | 149 notification_list_->SetMessageCenterVisible(false); |
150 UpdateTray(); | 150 UpdateTray(); |
151 status_area_widget()->SetHideSystemNotifications(false); | 151 status_area_widget()->SetHideSystemNotifications(false); |
152 Shell::GetInstance()->shelf()->UpdateAutoHideState(); | 152 GetShelfLayoutManager()->UpdateAutoHideState(); |
153 } | 153 } |
154 | 154 |
155 void WebNotificationTray::SetHidePopupBubble(bool hide) { | 155 void WebNotificationTray::SetHidePopupBubble(bool hide) { |
156 if (hide) | 156 if (hide) |
157 HidePopupBubble(); | 157 HidePopupBubble(); |
158 else | 158 else |
159 ShowPopupBubble(); | 159 ShowPopupBubble(); |
160 } | 160 } |
161 | 161 |
162 void WebNotificationTray::ShowPopupBubble() { | 162 void WebNotificationTray::ShowPopupBubble() { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 return message_center_bubble()->NumMessageViewsForTest(); | 388 return message_center_bubble()->NumMessageViewsForTest(); |
389 } | 389 } |
390 | 390 |
391 size_t WebNotificationTray::GetPopupNotificationCountForTest() const { | 391 size_t WebNotificationTray::GetPopupNotificationCountForTest() const { |
392 if (!popup_bubble()) | 392 if (!popup_bubble()) |
393 return 0; | 393 return 0; |
394 return popup_bubble()->NumMessageViewsForTest(); | 394 return popup_bubble()->NumMessageViewsForTest(); |
395 } | 395 } |
396 | 396 |
397 } // namespace ash | 397 } // namespace ash |
OLD | NEW |