OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSIONS_FILE_MANAGER_VOLUME_MANAGER_OBSERVER_
H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_VOLUME_MANAGER_OBSERVER_
H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_VOLUME_MANAGER_OBSERVER_
H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_VOLUME_MANAGER_OBSERVER_
H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "chromeos/disks/disk_mount_manager.h" |
| 11 |
10 namespace file_manager { | 12 namespace file_manager { |
11 | 13 |
12 struct VolumeInfo; | 14 struct VolumeInfo; |
13 | 15 |
14 // Observer interface of volume related events. | 16 // Observer interface of volume related events. |
15 class VolumeManagerObserver { | 17 class VolumeManagerObserver { |
16 public: | 18 public: |
17 virtual ~VolumeManagerObserver() {} | 19 virtual ~VolumeManagerObserver() {} |
18 | 20 |
| 21 // Fired when a new disk is added. |
| 22 virtual void OnDiskAdded( |
| 23 const chromeos::disks::DiskMountManager::Disk& disk, bool mounting) = 0; |
| 24 |
| 25 // Fired when a disk is removed. |
| 26 virtual void OnDiskRemoved( |
| 27 const chromeos::disks::DiskMountManager::Disk& disk) = 0; |
| 28 |
19 // Fired when a new device is added. | 29 // Fired when a new device is added. |
20 virtual void OnDeviceAdded(const std::string& device_path) = 0; | 30 virtual void OnDeviceAdded(const std::string& device_path) = 0; |
21 | 31 |
22 // Fired when a new device is removed. | 32 // Fired when a device is removed. |
23 virtual void OnDeviceRemoved(const std::string& device_path) = 0; | 33 virtual void OnDeviceRemoved(const std::string& device_path) = 0; |
| 34 |
| 35 // Fired when formatting a device is started (or failed to start). |
| 36 virtual void OnFormatStarted( |
| 37 const std::string& device_path, bool success) = 0; |
| 38 |
| 39 // Fired when formatting a device is completed (or terminated on error). |
| 40 virtual void OnFormatCompleted( |
| 41 const std::string& device_path, bool success) = 0; |
24 }; | 42 }; |
25 | 43 |
26 } // namespace file_manager | 44 } // namespace file_manager |
27 | 45 |
28 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_VOLUME_MANAGER_OBSERV
ER_H_ | 46 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_VOLUME_MANAGER_OBSERV
ER_H_ |
OLD | NEW |