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

Side by Side Diff: ash/system/tray/system_tray_controller.cc

Issue 2908333003: [mus+ash] Removes WmWindow from ash (app_list, frame, metrics, session, system, wallpaper) (Closed)
Patch Set: [mus ash] Removes WmWindow from ash (rebase, nits and cleanup of use of ResizeHandleWindowTargeter) Created 3 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/system/status_area_widget_delegate.cc ('k') | ash/system/tray/system_tray_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/system/tray/system_tray_controller.h" 5 #include "ash/system/tray/system_tray_controller.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/shell_port.h" 9 #include "ash/shell_port.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
11 #include "ash/system/tray/system_tray_notifier.h" 11 #include "ash/system/tray/system_tray_notifier.h"
12 #include "ash/system/update/tray_update.h" 12 #include "ash/system/update/tray_update.h"
13 #include "ash/wm_window.h"
14 13
15 namespace ash { 14 namespace ash {
16 15
17 SystemTrayController::SystemTrayController() 16 SystemTrayController::SystemTrayController()
18 : hour_clock_type_(base::GetHourClockType()) {} 17 : hour_clock_type_(base::GetHourClockType()) {}
19 18
20 SystemTrayController::~SystemTrayController() {} 19 SystemTrayController::~SystemTrayController() {}
21 20
22 void SystemTrayController::ShowSettings() { 21 void SystemTrayController::ShowSettings() {
23 if (system_tray_client_) 22 if (system_tray_client_)
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // External monitors might not have a tray yet. 209 // External monitors might not have a tray yet.
211 if (!tray) 210 if (!tray)
212 continue; 211 continue;
213 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required, 212 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required,
214 update_type); 213 update_type);
215 } 214 }
216 } 215 }
217 216
218 void SystemTrayController::ShowUpdateOverCellularAvailableIcon() { 217 void SystemTrayController::ShowUpdateOverCellularAvailableIcon() {
219 // Show the icon on all displays. 218 // Show the icon on all displays.
220 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) { 219 for (auto* root_window_controller : Shell::GetAllRootWindowControllers()) {
221 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); 220 ash::SystemTray* tray = root_window_controller->GetSystemTray();
222 // External monitors might not have a tray yet. 221 // External monitors might not have a tray yet.
223 if (!tray) 222 if (!tray)
224 continue; 223 continue;
225 tray->tray_update()->ShowUpdateOverCellularAvailableIcon(); 224 tray->tray_update()->ShowUpdateOverCellularAvailableIcon();
226 } 225 }
227 } 226 }
228 227
229 } // namespace ash 228 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/status_area_widget_delegate.cc ('k') | ash/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698