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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 tray->GetWidget()->Hide(); | 177 tray->GetWidget()->Hide(); |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 void SystemTrayController::SetUse24HourClock(bool use_24_hour) { | 181 void SystemTrayController::SetUse24HourClock(bool use_24_hour) { |
182 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock; | 182 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock; |
183 Shell::Get()->system_tray_notifier()->NotifyDateFormatChanged(); | 183 Shell::Get()->system_tray_notifier()->NotifyDateFormatChanged(); |
184 } | 184 } |
185 | 185 |
186 void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity, | 186 void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity, |
187 bool factory_reset_required) { | 187 bool factory_reset_required, |
| 188 mojom::UpdateType update_type) { |
188 // Show the icon on all displays. | 189 // Show the icon on all displays. |
189 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) { | 190 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) { |
190 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); | 191 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); |
191 // External monitors might not have a tray yet. | 192 // External monitors might not have a tray yet. |
192 if (!tray) | 193 if (!tray) |
193 continue; | 194 continue; |
194 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required); | 195 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required, |
| 196 update_type); |
195 } | 197 } |
196 } | 198 } |
197 | 199 |
198 } // namespace ash | 200 } // namespace ash |
OLD | NEW |