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

Unified Diff: components/arc/intent_helper/arc_intent_helper_bridge.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
Index: components/arc/intent_helper/arc_intent_helper_bridge.cc
diff --git a/components/arc/intent_helper/arc_intent_helper_bridge.cc b/components/arc/intent_helper/arc_intent_helper_bridge.cc
index 7dcb8be6a9a495ae8f96adf59ffb5e871a3c1e5d..0851be627b6ff012e6d7a3d10a6c8c4016d1574b 100644
--- a/components/arc/intent_helper/arc_intent_helper_bridge.cc
+++ b/components/arc/intent_helper/arc_intent_helper_bridge.cc
@@ -87,6 +87,14 @@ void ArcIntentHelperBridge::SetWallpaperDeprecated(
LOG(ERROR) << "IntentHelper.SetWallpaper is deprecated";
}
+void ArcIntentHelperBridge::AddObserver(ArcIntentHelperObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void ArcIntentHelperBridge::RemoveObserver(ArcIntentHelperObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
std::unique_ptr<ash::LinkHandlerModel> ArcIntentHelperBridge::CreateModel(
const GURL& url) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -165,6 +173,9 @@ void ArcIntentHelperBridge::OnIntentFiltersUpdated(
std::vector<mojom::IntentFilterPtr> filters) {
DCHECK(thread_checker_.CalledOnValidThread());
activity_resolver_->UpdateIntentFilters(std::move(filters));
+
+ for (auto& observer : observer_list_)
+ observer.OnAppsUpdated();
}
} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698