| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 virtual void DiskChanged(MountLibraryEventType event, | 170 virtual void DiskChanged(MountLibraryEventType event, |
| 171 const Disk* disk) = 0; | 171 const Disk* disk) = 0; |
| 172 virtual void DeviceChanged(MountLibraryEventType event, | 172 virtual void DeviceChanged(MountLibraryEventType event, |
| 173 const std::string& device_path) = 0; | 173 const std::string& device_path) = 0; |
| 174 virtual void MountCompleted(MountEvent event_type, | 174 virtual void MountCompleted(MountEvent event_type, |
| 175 MountError error_code, | 175 MountError error_code, |
| 176 const MountPointInfo& mount_info) = 0; | 176 const MountPointInfo& mount_info) = 0; |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 virtual ~MountLibrary() {} | 179 virtual ~MountLibrary() {} |
| 180 virtual void Init() = 0; |
| 180 virtual void AddObserver(Observer* observer) = 0; | 181 virtual void AddObserver(Observer* observer) = 0; |
| 181 virtual void RemoveObserver(Observer* observer) = 0; | 182 virtual void RemoveObserver(Observer* observer) = 0; |
| 182 virtual const DiskMap& disks() const = 0; | 183 virtual const DiskMap& disks() const = 0; |
| 183 virtual const MountPointMap& mount_points() const = 0; | 184 virtual const MountPointMap& mount_points() const = 0; |
| 184 | 185 |
| 185 virtual void RequestMountInfoRefresh() = 0; | 186 virtual void RequestMountInfoRefresh() = 0; |
| 186 virtual void MountPath(const char* source_path, | 187 virtual void MountPath(const char* source_path, |
| 187 MountType type, | 188 MountType type, |
| 188 const MountPathOptions& options) = 0; | 189 const MountPathOptions& options) = 0; |
| 189 // |path| is device's mount path. | 190 // |path| is device's mount path. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 210 virtual void SetLibcrosProxy(MountLibcrosProxy* proxy) {} | 211 virtual void SetLibcrosProxy(MountLibcrosProxy* proxy) {} |
| 211 | 212 |
| 212 // Factory function, creates a new instance and returns ownership. | 213 // Factory function, creates a new instance and returns ownership. |
| 213 // For normal usage, access the singleton via CrosLibrary::Get(). | 214 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 214 static MountLibrary* GetImpl(bool stub); | 215 static MountLibrary* GetImpl(bool stub); |
| 215 }; | 216 }; |
| 216 | 217 |
| 217 } // namespace chromeos | 218 } // namespace chromeos |
| 218 | 219 |
| 219 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ | 220 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ |
| OLD | NEW |