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

Unified Diff: components/arc/arc_service_manager.cc

Issue 2487623002: Notify Files App when ARC++ app is installed/removed (Closed)
Patch Set: Add IsInitialized to arc_service_manager. 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 | « components/arc/arc_service_manager.h ('k') | components/arc/intent_helper/arc_intent_helper_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_service_manager.cc
diff --git a/components/arc/arc_service_manager.cc b/components/arc/arc_service_manager.cc
index d6a68dc335c570ffab4f8f0d34ecc31adb816632..9642d9f40d16801672933118e22b7cc1851aa1b3 100644
--- a/components/arc/arc_service_manager.cc
+++ b/components/arc/arc_service_manager.cc
@@ -56,6 +56,11 @@ ArcServiceManager* ArcServiceManager::Get() {
return g_arc_service_manager;
}
+// static
+bool ArcServiceManager::IsInitialized() {
+ return g_arc_service_manager;
+}
+
ArcBridgeService* ArcServiceManager::arc_bridge_service() {
DCHECK(thread_checker_.CalledOnValidThread());
return arc_bridge_service_.get();
@@ -66,6 +71,19 @@ void ArcServiceManager::AddService(std::unique_ptr<ArcService> service) {
services_.emplace_back(std::move(service));
}
+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;
« no previous file with comments | « components/arc/arc_service_manager.h ('k') | components/arc/intent_helper/arc_intent_helper_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698