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

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

Issue 2816253002: Display "Restart to update Adobe Flash Player" for Flash updates. (Closed)
Patch Set: Fix nits from last review 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
« no previous file with comments | « ash/system/tray/system_tray_controller.h ('k') | ash/system/update/tray_update.h » ('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"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_controller.h ('k') | ash/system/update/tray_update.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698