Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: ash/common/system/web_notification/web_notification_tray.cc

Issue 2761373002: Move yet more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/system/user/user_view.cc ('k') | ash/common/test/test_session_controller_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/common/system/user/user_view.cc ('k') | ash/common/test/test_session_controller_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698