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

Unified Diff: ash/system/tray/system_tray_controller.cc

Issue 2882933002: Add update available icon in system tray (Closed)
Patch Set: Add file to BUILD.gn Created 3 years, 7 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_controller.cc
diff --git a/ash/system/tray/system_tray_controller.cc b/ash/system/tray/system_tray_controller.cc
index 5f3d07a08c30ca5d03089df12ab6e0671ea72e11..2bfc3f1fee1ed95ea0726cc26a277db5ad8f7ac5 100644
--- a/ash/system/tray/system_tray_controller.cc
+++ b/ash/system/tray/system_tray_controller.cc
@@ -70,6 +70,11 @@ void SystemTrayController::ShowIMESettings() {
system_tray_client_->ShowIMESettings();
}
+void SystemTrayController::ShowAboutChromeOS() {
+ if (system_tray_client_)
+ system_tray_client_->ShowAboutChromeOS();
+}
+
void SystemTrayController::ShowHelp() {
if (system_tray_client_)
system_tray_client_->ShowHelp();
@@ -210,4 +215,15 @@ void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity,
}
}
+void SystemTrayController::ShowUpdateOverCellularAvailableIcon() {
+ // Show the icon on all displays.
+ for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) {
+ ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray();
+ // External monitors might not have a tray yet.
+ if (!tray)
+ continue;
+ tray->tray_update()->ShowUpdateOverCellularAvailableIcon();
+ }
+}
+
} // namespace ash
« 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