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

Unified Diff: chrome/browser/upgrade_detector.h

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.cc ('k') | chrome/browser/upgrade_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/upgrade_detector.h
diff --git a/chrome/browser/upgrade_detector.h b/chrome/browser/upgrade_detector.h
index bc8542c8a9dd7335691449bdf129286fba556ca6..3936606c57be0a8dd409ad513ffba09ca7be92d6 100644
--- a/chrome/browser/upgrade_detector.h
+++ b/chrome/browser/upgrade_detector.h
@@ -7,12 +7,15 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
+#include "base/observer_list.h"
#include "base/timer/timer.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/upgrade_observer.h"
#include "ui/base/idle/idle.h"
#include "ui/gfx/image/image.h"
class PrefRegistrySimple;
+class UpgradeObserver;
///////////////////////////////////////////////////////////////////////////////
// UpgradeDetector
@@ -79,6 +82,10 @@ class UpgradeDetector {
return upgrade_notification_stage_;
}
+ void AddObserver(UpgradeObserver* observer);
+
+ void RemoveObserver(UpgradeObserver* observer);
+
protected:
enum UpgradeAvailable {
// If no update is available and current install is recent enough.
@@ -101,6 +108,11 @@ class UpgradeDetector {
// Sends out UPGRADE_RECOMMENDED notification and set notify_upgrade_.
void NotifyUpgradeRecommended();
+ // The function that sends out a notification that lets the rest of the UI
+ // know we should notify the user that a new update is available to download
+ // over cellular connection.
+ void NotifyUpdateOverCellularAvailable();
+
// Triggers a critical update, which starts a timer that checks the machine
// idle state. Protected and virtual so that it could be overridden by tests.
virtual void TriggerCriticalUpdate();
@@ -175,6 +187,8 @@ class UpgradeDetector {
// is we should start nagging about upgrading).
bool notify_upgrade_;
+ base::ObserverList<UpgradeObserver> observer_list_;
+
DISALLOW_COPY_AND_ASSIGN(UpgradeDetector);
};
« no previous file with comments | « chrome/browser/ui/ash/system_tray_client.cc ('k') | chrome/browser/upgrade_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698