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

Side by Side Diff: ash/test/status_area_widget_test_helper.cc

Issue 2864663002: cros: Merge SystemTrayDelegate::GetUserLoginStatus (Closed)
Patch Set: update PaletteTray to exclude ARC kiosk Created 3 years, 7 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/system/tray_accessibility.cc ('k') | ash/test/test_system_tray_delegate.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/status_area_widget_test_helper.h" 5 #include "ash/test/status_area_widget_test_helper.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/session/session_controller.h"
8 #include "ash/shell.h" 9 #include "ash/shell.h"
9 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
10 #include "ash/system/tray/system_tray_delegate.h"
11 11
12 namespace ash { 12 namespace ash {
13 13
14 LoginStatus StatusAreaWidgetTestHelper::GetUserLoginStatus() { 14 LoginStatus StatusAreaWidgetTestHelper::GetUserLoginStatus() {
15 return Shell::Get()->system_tray_delegate()->GetUserLoginStatus(); 15 return Shell::Get()->session_controller()->login_status();
16 } 16 }
17 17
18 StatusAreaWidget* StatusAreaWidgetTestHelper::GetStatusAreaWidget() { 18 StatusAreaWidget* StatusAreaWidgetTestHelper::GetStatusAreaWidget() {
19 return Shell::GetPrimaryRootWindowController()->GetStatusAreaWidget(); 19 return Shell::GetPrimaryRootWindowController()->GetStatusAreaWidget();
20 } 20 }
21 21
22 StatusAreaWidget* StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget() { 22 StatusAreaWidget* StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget() {
23 RootWindowController* primary_controller = 23 RootWindowController* primary_controller =
24 Shell::GetPrimaryRootWindowController(); 24 Shell::GetPrimaryRootWindowController();
25 Shell::RootWindowControllerList controllers = 25 Shell::RootWindowControllerList controllers =
26 Shell::GetAllRootWindowControllers(); 26 Shell::GetAllRootWindowControllers();
27 for (size_t i = 0; i < controllers.size(); ++i) { 27 for (size_t i = 0; i < controllers.size(); ++i) {
28 if (controllers[i] != primary_controller) 28 if (controllers[i] != primary_controller)
29 return controllers[i]->GetStatusAreaWidget(); 29 return controllers[i]->GetStatusAreaWidget();
30 } 30 }
31 31
32 return nullptr; 32 return nullptr;
33 } 33 }
34 34
35 } // namespace ash 35 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray_accessibility.cc ('k') | ash/test/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698