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

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

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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/test/status_area_widget_test_helper.h ('k') | ash/test/test_session_state_delegate.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 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/shelf/shelf_widget.h" 8 #include "ash/shelf/shelf_widget.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
11 #include "ash/system/tray/system_tray_delegate.h" 11 #include "ash/system/tray/system_tray_delegate.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 user::LoginStatus StatusAreaWidgetTestHelper::GetUserLoginStatus() { 15 LoginStatus StatusAreaWidgetTestHelper::GetUserLoginStatus() {
16 return Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus(); 16 return Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus();
17 } 17 }
18 18
19 StatusAreaWidget* StatusAreaWidgetTestHelper::GetStatusAreaWidget() { 19 StatusAreaWidget* StatusAreaWidgetTestHelper::GetStatusAreaWidget() {
20 return Shell::GetPrimaryRootWindowController() 20 return Shell::GetPrimaryRootWindowController()
21 ->shelf_widget() 21 ->shelf_widget()
22 ->status_area_widget(); 22 ->status_area_widget();
23 } 23 }
24 24
25 StatusAreaWidget* StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget() { 25 StatusAreaWidget* StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget() {
26 RootWindowController* primary_controller = 26 RootWindowController* primary_controller =
27 Shell::GetPrimaryRootWindowController(); 27 Shell::GetPrimaryRootWindowController();
28 Shell::RootWindowControllerList controllers = 28 Shell::RootWindowControllerList controllers =
29 Shell::GetAllRootWindowControllers(); 29 Shell::GetAllRootWindowControllers();
30 for (size_t i = 0; i < controllers.size(); ++i) { 30 for (size_t i = 0; i < controllers.size(); ++i) {
31 if (controllers[i] != primary_controller) 31 if (controllers[i] != primary_controller)
32 return controllers[i]->shelf_widget()->status_area_widget(); 32 return controllers[i]->shelf_widget()->status_area_widget();
33 } 33 }
34 34
35 return NULL; 35 return NULL;
36 } 36 }
37 37
38 } // namespace ash 38 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/status_area_widget_test_helper.h ('k') | ash/test/test_session_state_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698