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

Side by Side 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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void SystemTrayController::ShowChromeSlow() { 63 void SystemTrayController::ShowChromeSlow() {
64 if (system_tray_client_) 64 if (system_tray_client_)
65 system_tray_client_->ShowChromeSlow(); 65 system_tray_client_->ShowChromeSlow();
66 } 66 }
67 67
68 void SystemTrayController::ShowIMESettings() { 68 void SystemTrayController::ShowIMESettings() {
69 if (system_tray_client_) 69 if (system_tray_client_)
70 system_tray_client_->ShowIMESettings(); 70 system_tray_client_->ShowIMESettings();
71 } 71 }
72 72
73 void SystemTrayController::ShowAboutChromeOS() {
74 if (system_tray_client_)
75 system_tray_client_->ShowAboutChromeOS();
76 }
77
73 void SystemTrayController::ShowHelp() { 78 void SystemTrayController::ShowHelp() {
74 if (system_tray_client_) 79 if (system_tray_client_)
75 system_tray_client_->ShowHelp(); 80 system_tray_client_->ShowHelp();
76 } 81 }
77 82
78 void SystemTrayController::ShowAccessibilityHelp() { 83 void SystemTrayController::ShowAccessibilityHelp() {
79 if (system_tray_client_) 84 if (system_tray_client_)
80 system_tray_client_->ShowAccessibilityHelp(); 85 system_tray_client_->ShowAccessibilityHelp();
81 } 86 }
82 87
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) { 208 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) {
204 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); 209 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray();
205 // External monitors might not have a tray yet. 210 // External monitors might not have a tray yet.
206 if (!tray) 211 if (!tray)
207 continue; 212 continue;
208 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required, 213 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required,
209 update_type); 214 update_type);
210 } 215 }
211 } 216 }
212 217
218 void SystemTrayController::ShowUpdateOverCellularAvailableIcon() {
219 // Show the icon on all displays.
220 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) {
221 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray();
222 // External monitors might not have a tray yet.
223 if (!tray)
224 continue;
225 tray->tray_update()->ShowUpdateOverCellularAvailableIcon();
226 }
227 }
228
213 } // namespace ash 229 } // 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