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

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

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

Powered by Google App Engine
This is Rietveld 408576698