| OLD | NEW |
| 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" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bool active_directory_managed) { | 193 bool active_directory_managed) { |
| 194 enterprise_domain_ = enterprise_domain; | 194 enterprise_domain_ = enterprise_domain; |
| 195 active_directory_managed_ = active_directory_managed; | 195 active_directory_managed_ = active_directory_managed; |
| 196 Shell::Get()->system_tray_notifier()->NotifyEnterpriseDomainChanged(); | 196 Shell::Get()->system_tray_notifier()->NotifyEnterpriseDomainChanged(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity, | 199 void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity, |
| 200 bool factory_reset_required, | 200 bool factory_reset_required, |
| 201 mojom::UpdateType update_type) { | 201 mojom::UpdateType update_type) { |
| 202 // Show the icon on all displays. | 202 // Show the icon on all displays. |
| 203 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) { | 203 for (RootWindowController* root : Shell::GetAllRootWindowControllers()) { |
| 204 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); | 204 ash::SystemTray* tray = root->GetSystemTray(); |
| 205 // External monitors might not have a tray yet. | 205 // External monitors might not have a tray yet. |
| 206 if (!tray) | 206 if (!tray) |
| 207 continue; | 207 continue; |
| 208 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required, | 208 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required, |
| 209 update_type); | 209 update_type); |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace ash | 213 } // namespace ash |
| OLD | NEW |