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

Unified Diff: ash/common/system/tray/system_tray_notifier.cc

Issue 2568413002: Revert of ash: Use system tray mojo interface to show system update tray icon (Closed)
Patch Set: Created 4 years 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/common/system/tray/system_tray_notifier.h ('k') | ash/common/system/tray/tray_image_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray_notifier.cc
diff --git a/ash/common/system/tray/system_tray_notifier.cc b/ash/common/system/tray/system_tray_notifier.cc
index 5f3af6ba1ae63d9e4b5380956ad9427174980b6a..e530b8c43a4c3e484b8b9b2ca9d39beb8fd64639 100644
--- a/ash/common/system/tray/system_tray_notifier.cc
+++ b/ash/common/system/tray/system_tray_notifier.cc
@@ -7,6 +7,7 @@
#include "ash/common/system/accessibility_observer.h"
#include "ash/common/system/date/clock_observer.h"
#include "ash/common/system/ime/ime_observer.h"
+#include "ash/common/system/update/update_observer.h"
#include "ash/common/system/user/user_observer.h"
#if defined(OS_CHROMEOS)
@@ -92,6 +93,19 @@
observer.OnIMEMenuActivationChanged(is_active);
}
+void SystemTrayNotifier::AddUpdateObserver(UpdateObserver* observer) {
+ update_observers_.AddObserver(observer);
+}
+
+void SystemTrayNotifier::RemoveUpdateObserver(UpdateObserver* observer) {
+ update_observers_.RemoveObserver(observer);
+}
+
+void SystemTrayNotifier::NotifyUpdateRecommended(const UpdateInfo& info) {
+ for (auto& observer : update_observers_)
+ observer.OnUpdateRecommended(info);
+}
+
void SystemTrayNotifier::AddUserObserver(UserObserver* observer) {
user_observers_.AddObserver(observer);
}
« no previous file with comments | « ash/common/system/tray/system_tray_notifier.h ('k') | ash/common/system/tray/tray_image_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698