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

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h

Issue 2580303002: mediaview: Mount ARC documents provider file system volumes. (Closed)
Patch Set: Add a getter of ArcFileSystemService to ArcServiceManager so that VolumeManager can subscribe to AF… 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: chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h b/chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h
index 11be0cefc4a37aa7e8cd523b56ae8276b8e9a316..2cdcdf4759f060f5b28944a56018b2e7bf756c97 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h
+++ b/chrome/browser/chromeos/arc/fileapi/arc_file_system_service.h
@@ -6,19 +6,33 @@
#define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_FILE_SYSTEM_SERVICE_H_
#include "base/macros.h"
+#include "base/observer_list.h"
#include "components/arc/arc_service.h"
+#include "components/arc/common/file_system.mojom.h"
+#include "components/arc/instance_holder.h"
namespace arc {
class ArcBridgeService;
+class ArcFileSystemObserver;
// ArcFileSystemService registers ARC file systems to the system.
-class ArcFileSystemService : public ArcService {
+class ArcFileSystemService
+ : public ArcService,
+ public InstanceHolder<mojom::FileSystemInstance>::Observer {
public:
explicit ArcFileSystemService(ArcBridgeService* bridge_service);
~ArcFileSystemService() override;
+ void AddObserver(ArcFileSystemObserver* observer);
+ void RemoveObserver(ArcFileSystemObserver* observer);
+
+ // InstanceHolder<mojom::FileSystemInstance>::Observer overrides:
+ void OnInstanceReady() override;
+
private:
+ base::ObserverList<ArcFileSystemObserver> observer_list_;
+
DISALLOW_COPY_AND_ASSIGN(ArcFileSystemService);
};

Powered by Google App Engine
This is Rietveld 408576698