OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 std::string system_path; | 42 std::string system_path; |
43 // if the device is a parent device (i.e. sdb rather than sdb1) | 43 // if the device is a parent device (i.e. sdb rather than sdb1) |
44 bool is_parent; | 44 bool is_parent; |
45 // if the device has media currently | 45 // if the device has media currently |
46 bool has_media; | 46 bool has_media; |
47 }; | 47 }; |
48 typedef std::vector<Disk> DiskVector; | 48 typedef std::vector<Disk> DiskVector; |
49 | 49 |
50 class Observer { | 50 class Observer { |
51 public: | 51 public: |
| 52 virtual ~Observer() {} |
52 virtual void MountChanged(MountLibrary* obj, | 53 virtual void MountChanged(MountLibrary* obj, |
53 MountEventType evt, | 54 MountEventType evt, |
54 const std::string& path) = 0; | 55 const std::string& path) = 0; |
55 }; | 56 }; |
56 | 57 |
57 virtual ~MountLibrary() {} | 58 virtual ~MountLibrary() {} |
58 virtual void AddObserver(Observer* observer) = 0; | 59 virtual void AddObserver(Observer* observer) = 0; |
59 virtual void RemoveObserver(Observer* observer) = 0; | 60 virtual void RemoveObserver(Observer* observer) = 0; |
60 virtual const DiskVector& disks() const = 0; | 61 virtual const DiskVector& disks() const = 0; |
61 virtual bool MountPath(const char* device_path) = 0; | 62 virtual bool MountPath(const char* device_path) = 0; |
| 63 virtual bool IsBootPath(const char* device_path) = 0; |
62 | 64 |
63 // Factory function, creates a new instance and returns ownership. | 65 // Factory function, creates a new instance and returns ownership. |
64 // For normal usage, access the singleton via CrosLibrary::Get(). | 66 // For normal usage, access the singleton via CrosLibrary::Get(). |
65 static MountLibrary* GetImpl(bool stub); | 67 static MountLibrary* GetImpl(bool stub); |
66 }; | 68 }; |
67 | 69 |
68 } // namespace chromeos | 70 } // namespace chromeos |
69 | 71 |
70 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ | 72 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOUNT_LIBRARY_H_ |
OLD | NEW |