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

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

Issue 2808723004: Renames WmShell to ShellPort (Closed)
Patch Set: feedback Created 3 years, 8 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/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/status_area_widget.h" 9 #include "ash/system/status_area_widget.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
11 #include "ash/wm_shell.h"
12 11
13 namespace ash { 12 namespace ash {
14 13
15 LoginStatus StatusAreaWidgetTestHelper::GetUserLoginStatus() { 14 LoginStatus StatusAreaWidgetTestHelper::GetUserLoginStatus() {
16 return Shell::Get()->system_tray_delegate()->GetUserLoginStatus(); 15 return Shell::Get()->system_tray_delegate()->GetUserLoginStatus();
17 } 16 }
18 17
19 StatusAreaWidget* StatusAreaWidgetTestHelper::GetStatusAreaWidget() { 18 StatusAreaWidget* StatusAreaWidgetTestHelper::GetStatusAreaWidget() {
20 return Shell::GetPrimaryRootWindowController()->GetStatusAreaWidget(); 19 return Shell::GetPrimaryRootWindowController()->GetStatusAreaWidget();
21 } 20 }
22 21
23 StatusAreaWidget* StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget() { 22 StatusAreaWidget* StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget() {
24 RootWindowController* primary_controller = 23 RootWindowController* primary_controller =
25 Shell::GetPrimaryRootWindowController(); 24 Shell::GetPrimaryRootWindowController();
26 Shell::RootWindowControllerList controllers = 25 Shell::RootWindowControllerList controllers =
27 Shell::GetAllRootWindowControllers(); 26 Shell::GetAllRootWindowControllers();
28 for (size_t i = 0; i < controllers.size(); ++i) { 27 for (size_t i = 0; i < controllers.size(); ++i) {
29 if (controllers[i] != primary_controller) 28 if (controllers[i] != primary_controller)
30 return controllers[i]->GetStatusAreaWidget(); 29 return controllers[i]->GetStatusAreaWidget();
31 } 30 }
32 31
33 return nullptr; 32 return nullptr;
34 } 33 }
35 34
36 } // namespace ash 35 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698