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

Unified Diff: components/arc/arc_service_manager.cc

Issue 2580303002: mediaview: Mount ARC documents provider file system volumes. (Closed)
Patch Set: Rebased. Created 3 years, 11 months 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 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()) {

Powered by Google App Engine
This is Rietveld 408576698