X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fchromeos%2Ffile_manager%2Fvolume_manager.h;h=da3b2e7e0e9fc665ddfb1742903e1282ef26a204;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=de8f28b10bed05f1033ff337a9113bc4fe0db351;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/chromeos/file_manager/volume_manager.h b/src/chrome/browser/chromeos/file_manager/volume_manager.h index de8f28b..da3b2e7 100644 --- a/src/chrome/browser/chromeos/file_manager/volume_manager.h +++ b/src/chrome/browser/chromeos/file_manager/volume_manager.h @@ -14,6 +14,7 @@ #include "base/observer_list.h" #include "base/prefs/pref_change_registrar.h" #include "chrome/browser/chromeos/drive/drive_integration_service.h" +#include "chrome/browser/local_discovery/storage/privet_volume_lister.h" #include "chromeos/dbus/cros_disks_client.h" #include "chromeos/disks/disk_mount_manager.h" #include "components/browser_context_keyed_service/browser_context_keyed_service.h" @@ -129,6 +130,9 @@ class VolumeManager : public BrowserContextKeyedService, bool FindVolumeInfoById(const std::string& volume_id, VolumeInfo* result) const; + // For testing purpose, adds the custom |path| as the "Downloads" folder. + bool RegisterDownloadsDirectoryForTesting(const base::FilePath& path); + // drive::DriveIntegrationServiceObserver overrides. virtual void OnFileSystemMounted() OVERRIDE; virtual void OnFileSystemBeingUnmounted() OVERRIDE; @@ -154,12 +158,24 @@ class VolumeManager : public BrowserContextKeyedService, void OnExternalStorageDisabledChanged(); private: + void OnPrivetVolumesAvailable( + const local_discovery::PrivetVolumeLister::VolumeList& volumes); + void DoMountEvent(chromeos::MountError error_code, + const VolumeInfo& volume_info, + bool is_remounting); + void DoUnmountEvent(chromeos::MountError error_code, + const VolumeInfo& volume_info); + Profile* profile_; drive::DriveIntegrationService* drive_integration_service_; chromeos::disks::DiskMountManager* disk_mount_manager_; scoped_ptr mounted_disk_monitor_; PrefChangeRegistrar pref_change_registrar_; ObserverList observers_; + scoped_ptr privet_volume_lister_; + + std::map mounted_volumes_; + DISALLOW_COPY_AND_ASSIGN(VolumeManager); };