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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shelf/shelf_layout_manager_observer.h" | 10 #include "ash/shelf/shelf_layout_manager_observer.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 void WebNotificationTray::ShowMessageCenterBubble() { | 296 void WebNotificationTray::ShowMessageCenterBubble() { |
297 if (!IsMessageCenterBubbleVisible()) | 297 if (!IsMessageCenterBubbleVisible()) |
298 message_center_tray_->ShowMessageCenterBubble(); | 298 message_center_tray_->ShowMessageCenterBubble(); |
299 } | 299 } |
300 | 300 |
301 void WebNotificationTray::UpdateAfterLoginStatusChange( | 301 void WebNotificationTray::UpdateAfterLoginStatusChange( |
302 user::LoginStatus login_status) { | 302 user::LoginStatus login_status) { |
303 OnMessageCenterTrayChanged(); | 303 OnMessageCenterTrayChanged(); |
304 } | 304 } |
305 | 305 |
306 void WebNotificationTray::SetShelfAlignment(ShelfAlignment alignment) { | 306 void WebNotificationTray::SetShelfAlignment(wm::ShelfAlignment alignment) { |
307 if (alignment == shelf_alignment()) | 307 if (alignment == shelf_alignment()) |
308 return; | 308 return; |
309 TrayBackgroundView::SetShelfAlignment(alignment); | 309 TrayBackgroundView::SetShelfAlignment(alignment); |
310 tray_container()->SetBorder(views::Border::NullBorder()); | 310 tray_container()->SetBorder(views::Border::NullBorder()); |
311 // Destroy any existing bubble so that it will be rebuilt correctly. | 311 // Destroy any existing bubble so that it will be rebuilt correctly. |
312 message_center_tray_->HideMessageCenterBubble(); | 312 message_center_tray_->HideMessageCenterBubble(); |
313 message_center_tray_->HidePopupBubble(); | 313 message_center_tray_->HidePopupBubble(); |
314 } | 314 } |
315 | 315 |
316 void WebNotificationTray::AnchorUpdated() { | 316 void WebNotificationTray::AnchorUpdated() { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 478 |
479 message_center::MessageCenterBubble* | 479 message_center::MessageCenterBubble* |
480 WebNotificationTray::GetMessageCenterBubbleForTest() { | 480 WebNotificationTray::GetMessageCenterBubbleForTest() { |
481 if (!message_center_bubble()) | 481 if (!message_center_bubble()) |
482 return NULL; | 482 return NULL; |
483 return static_cast<message_center::MessageCenterBubble*>( | 483 return static_cast<message_center::MessageCenterBubble*>( |
484 message_center_bubble()->bubble()); | 484 message_center_bubble()->bubble()); |
485 } | 485 } |
486 | 486 |
487 } // namespace ash | 487 } // namespace ash |
OLD | NEW |