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

Unified Diff: components/arc/arc_service_manager.cc

Issue 2487623002: Notify Files App when ARC++ app is installed/removed (Closed)
Patch Set: Bug fix: I forgot to add intent_helper to arc_service_manager. Created 4 years, 1 month 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
Index: components/arc/arc_service_manager.cc
diff --git a/components/arc/arc_service_manager.cc b/components/arc/arc_service_manager.cc
index 6d6a25f5fdf87cc191176b86f63f1177cde0239f..13fee9f89265528d0098279669dcc845db19f13e 100644
--- a/components/arc/arc_service_manager.cc
+++ b/components/arc/arc_service_manager.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/memory/ptr_util.h"
+#include "base/observer_list.h"
#include "base/sequenced_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/arc/arc_bridge_service.h"
@@ -105,6 +106,19 @@ void ArcServiceManager::OnPrimaryUserProfilePrepared(
account_id));
}
+void ArcServiceManager::AddObserver(Observer* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void ArcServiceManager::RemoveObserver(Observer* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
+void ArcServiceManager::OnAppsUpdated() {
+ for (auto& observer : observer_list_)
+ observer.OnAppsUpdated();
+}
+
void ArcServiceManager::Shutdown() {
icon_loader_ = nullptr;
activity_resolver_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698