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

Unified Diff: chrome/browser/ui/ash/system_tray_client.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 | « chrome/browser/ui/ash/system_tray_client.h ('k') | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/system_tray_client.cc
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc
index be329e66571038c8989acefceb70d21492aa2b3c..c4ff0ae233c295b4022f1083ece0c879ea8409e4 100644
--- a/chrome/browser/ui/ash/system_tray_client.cc
+++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -10,6 +10,7 @@
#include "ash/shell.h"
#include "base/feature_list.h"
#include "base/logging.h"
+#include "base/memory/weak_ptr.h"
#include "base/metrics/user_metrics.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
@@ -61,6 +62,7 @@
using chromeos::BluetoothPairingDialog;
using chromeos::DBusThreadManager;
using chromeos::LoginState;
+using chromeos::UpdateEngineClient;
using device::BluetoothDevice;
using views::Widget;
@@ -124,6 +126,7 @@ SystemTrayClient::SystemTrayClient() : binding_(this) {
DCHECK(!g_instance);
g_instance = this;
+ UpgradeDetector::GetInstance()->AddObserver(this);
}
SystemTrayClient::~SystemTrayClient() {
@@ -138,6 +141,7 @@ SystemTrayClient::~SystemTrayClient() {
policy_manager->core()->store()->RemoveObserver(this);
g_browser_process->platform_part()->GetSystemClock()->RemoveObserver(this);
+ UpgradeDetector::GetInstance()->RemoveObserver(this);
}
// static
@@ -294,6 +298,13 @@ void SystemTrayClient::ShowIMESettings() {
ShowSettingsSubPageForActiveUser(chrome::kLanguageOptionsSubPage);
}
+void SystemTrayClient::ShowAboutChromeOS() {
+ // We always want to check for updates when showing the about page from the
+ // Ash UI.
+ ShowSettingsSubPageForActiveUser(std::string(chrome::kHelpSubPage) +
+ "?checkForUpdate=true");
+}
+
void SystemTrayClient::ShowHelp() {
chrome::ShowHelpForProfile(ProfileManager::GetActiveUserProfile(),
chrome::HELP_SOURCE_MENU);
@@ -460,6 +471,10 @@ void SystemTrayClient::HandleUpdateAvailable() {
update_type);
}
+void SystemTrayClient::HandleUpdateOverCellularAvailable() {
+ system_tray_->ShowUpdateOverCellularAvailableIcon();
+}
+
////////////////////////////////////////////////////////////////////////////////
// chromeos::system::SystemClockObserver:
@@ -476,6 +491,12 @@ void SystemTrayClient::Observe(int type,
}
////////////////////////////////////////////////////////////////////////////////
+// UpgradeDetector::UpgradeObserver:
+void SystemTrayClient::OnUpdateOverCellularAvailable() {
+ HandleUpdateOverCellularAvailable();
+}
+
+////////////////////////////////////////////////////////////////////////////////
// policy::CloudPolicyStore::Observer
void SystemTrayClient::OnStoreLoaded(policy::CloudPolicyStore* store) {
UpdateEnterpriseDomain();
« no previous file with comments | « chrome/browser/ui/ash/system_tray_client.h ('k') | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698