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
3 // found in the LICENSE file.
5 #include "ash/test/status_area_widget_test_helper.h"
7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_widget.h"
10 #include "ash/system/status_area_widget.h"
11 #include "ash/system/tray/system_tray_delegate.h"
15 user::LoginStatus
StatusAreaWidgetTestHelper::GetUserLoginStatus() {
16 return Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus();
19 StatusAreaWidget
* StatusAreaWidgetTestHelper::GetStatusAreaWidget() {
20 return Shell::GetPrimaryRootWindowController()->shelf()->
24 StatusAreaWidget
* StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget() {
25 RootWindowController
* primary_controller
=
26 Shell::GetPrimaryRootWindowController();
27 Shell::RootWindowControllerList controllers
=
28 Shell::GetAllRootWindowControllers();
29 for (size_t i
= 0; i
< controllers
.size(); ++i
) {
30 if (controllers
[i
] != primary_controller
)
31 return controllers
[i
]->shelf()->status_area_widget();