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

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

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase 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
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_state_delegate.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"
11 #include "ash/common/system/status_area_widget.h" 11 #include "ash/common/system/status_area_widget.h"
12 #include "ash/common/system/tray/system_tray.h" 12 #include "ash/common/system/tray/system_tray.h"
13 #include "ash/common/system/tray/system_tray_delegate.h" 13 #include "ash/common/system/tray/system_tray_delegate.h"
14 #include "ash/common/system/tray/tray_bubble_wrapper.h" 14 #include "ash/common/system/tray/tray_bubble_wrapper.h"
15 #include "ash/common/system/tray/tray_constants.h" 15 #include "ash/common/system/tray/tray_constants.h"
16 #include "ash/common/system/tray/tray_utils.h" 16 #include "ash/common/system/tray/tray_utils.h"
17 #include "ash/common/system/web_notification/ash_popup_alignment_delegate.h" 17 #include "ash/common/system/web_notification/ash_popup_alignment_delegate.h"
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 } 609 }
610 610
611 message_center::MessageCenter* WebNotificationTray::message_center() const { 611 message_center::MessageCenter* WebNotificationTray::message_center() const {
612 return message_center_tray_->message_center(); 612 return message_center_tray_->message_center();
613 } 613 }
614 614
615 bool WebNotificationTray::IsLoggedIn() const { 615 bool WebNotificationTray::IsLoggedIn() const {
616 WmShell* shell = WmShell::Get(); 616 WmShell* shell = WmShell::Get();
617 return shell->system_tray_delegate()->GetUserLoginStatus() != 617 return shell->system_tray_delegate()->GetUserLoginStatus() !=
618 LoginStatus::NOT_LOGGED_IN && 618 LoginStatus::NOT_LOGGED_IN &&
619 !shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen(); 619 !shell->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

Powered by Google App Engine
This is Rietveld 408576698