Index: components/arc/arc_service_manager.cc |
diff --git a/components/arc/arc_service_manager.cc b/components/arc/arc_service_manager.cc |
index 9204fef44844ccd7fc9ea29da2e6ba91aaba29fe..2fb591a5e8feba3ecfdb2f9cd5bb5834c8aeaae7 100644 |
--- a/components/arc/arc_service_manager.cc |
+++ b/components/arc/arc_service_manager.cc |
@@ -12,6 +12,7 @@ |
#include "components/arc/arc_bridge_service.h" |
#include "components/arc/arc_session.h" |
#include "components/arc/arc_session_runner.h" |
+#include "components/arc/file_system/arc_file_system_observer.h" |
#include "components/arc/intent_helper/arc_intent_helper_observer.h" |
namespace arc { |
@@ -45,10 +46,33 @@ void ArcServiceManager::IntentHelperObserverImpl::OnIntentFiltersUpdated() { |
observer.OnIntentFiltersUpdated(); |
} |
+class ArcServiceManager::FileSystemObserverImpl : public ArcFileSystemObserver { |
+ public: |
+ explicit FileSystemObserverImpl(ArcServiceManager* manager); |
+ ~FileSystemObserverImpl() override = default; |
+ |
+ private: |
+ void OnFileSystemsReady() override; |
+ ArcServiceManager* const manager_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(FileSystemObserverImpl); |
+}; |
+ |
+ArcServiceManager::FileSystemObserverImpl::FileSystemObserverImpl( |
+ ArcServiceManager* manager) |
+ : manager_(manager) {} |
+ |
+void ArcServiceManager::FileSystemObserverImpl::OnFileSystemsReady() { |
+ DCHECK(manager_->thread_checker_.CalledOnValidThread()); |
+ for (auto& observer : manager_->observer_list_) |
+ observer.OnFileSystemsReady(); |
+} |
+ |
ArcServiceManager::ArcServiceManager( |
scoped_refptr<base::TaskRunner> blocking_task_runner) |
: blocking_task_runner_(blocking_task_runner), |
intent_helper_observer_(base::MakeUnique<IntentHelperObserverImpl>(this)), |
+ file_system_observer_(base::MakeUnique<FileSystemObserverImpl>(this)), |
arc_bridge_service_(base::MakeUnique<ArcBridgeService>()), |
icon_loader_(new ActivityIconLoader()), |
activity_resolver_(new LocalActivityResolver()) { |