Chromium Code Reviews| 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_) |
|
hidehiko
2016/11/25 15:38:00
Could you add simple unittest to make sure observe
oka
2016/11/28 07:15:43
OK. I'm working on it.
oka
2016/11/28 09:57:01
Added a test which at least compile. I couldn't fi
|
| + observer.OnAppsUpdated(); |
| } |
| } // namespace arc |