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/session/session_controller.h" | 7 #include "ash/common/session/session_controller.h" |
8 #include "ash/common/shelf/shelf_constants.h" | 8 #include "ash/common/shelf/shelf_constants.h" |
9 #include "ash/common/shelf/wm_shelf.h" | 9 #include "ash/common/shelf/wm_shelf.h" |
10 #include "ash/common/shelf/wm_shelf_util.h" | 10 #include "ash/common/shelf/wm_shelf_util.h" |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 message_center_tray_->HideMessageCenterBubble(); | 609 message_center_tray_->HideMessageCenterBubble(); |
610 } | 610 } |
611 | 611 |
612 message_center::MessageCenter* WebNotificationTray::message_center() const { | 612 message_center::MessageCenter* WebNotificationTray::message_center() const { |
613 return message_center_tray_->message_center(); | 613 return message_center_tray_->message_center(); |
614 } | 614 } |
615 | 615 |
616 bool WebNotificationTray::IsLoggedIn() const { | 616 bool WebNotificationTray::IsLoggedIn() const { |
617 return Shell::Get()->system_tray_delegate()->GetUserLoginStatus() != | 617 return Shell::Get()->system_tray_delegate()->GetUserLoginStatus() != |
618 LoginStatus::NOT_LOGGED_IN && | 618 LoginStatus::NOT_LOGGED_IN && |
619 !WmShell::Get()->session_controller()->IsInSecondaryLoginScreen(); | 619 !Shell::Get()->session_controller()->IsInSecondaryLoginScreen(); |
620 } | 620 } |
621 | 621 |
622 // Methods for testing | 622 // Methods for testing |
623 | 623 |
624 bool WebNotificationTray::IsPopupVisible() const { | 624 bool WebNotificationTray::IsPopupVisible() const { |
625 return message_center_tray_->popups_visible(); | 625 return message_center_tray_->popups_visible(); |
626 } | 626 } |
627 | 627 |
628 message_center::MessageCenterBubble* | 628 message_center::MessageCenterBubble* |
629 WebNotificationTray::GetMessageCenterBubbleForTest() { | 629 WebNotificationTray::GetMessageCenterBubbleForTest() { |
630 if (!message_center_bubble()) | 630 if (!message_center_bubble()) |
631 return nullptr; | 631 return nullptr; |
632 return static_cast<message_center::MessageCenterBubble*>( | 632 return static_cast<message_center::MessageCenterBubble*>( |
633 message_center_bubble()->bubble()); | 633 message_center_bubble()->bubble()); |
634 } | 634 } |
635 | 635 |
636 } // namespace ash | 636 } // namespace ash |
OLD | NEW |