OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
6 #define CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 6 #define CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 29 matching lines...) Expand all Loading... |
40 // returns true and fills in |location|, |unique_id|, |name|, |removable|, and | 40 // returns true and fills in |location|, |unique_id|, |name|, |removable|, and |
41 // |total_size_in_bytes|. | 41 // |total_size_in_bytes|. |
42 // Can block during startup while device info is still loading. | 42 // Can block during startup while device info is still loading. |
43 bool GetDeviceInfo(const base::FilePath& device_path, | 43 bool GetDeviceInfo(const base::FilePath& device_path, |
44 string16* location, | 44 string16* location, |
45 std::string* unique_id, | 45 std::string* unique_id, |
46 string16* name, | 46 string16* name, |
47 bool* removable, | 47 bool* removable, |
48 uint64* total_size_in_bytes) const; | 48 uint64* total_size_in_bytes) const; |
49 | 49 |
50 // Returns the partition size of the given mount location. Returns 0 if the | |
51 // location is unknown. | |
52 uint64 GetStorageSize(const base::FilePath::StringType& mount_point) const; | |
53 | |
54 // Processes DEV_BROADCAST_VOLUME messages and triggers a | 50 // Processes DEV_BROADCAST_VOLUME messages and triggers a |
55 // notification if appropriate. | 51 // notification if appropriate. |
56 void OnWindowMessage(UINT event_type, LPARAM data); | 52 void OnWindowMessage(UINT event_type, LPARAM data); |
57 | 53 |
58 // Set the volume notifications object to be used when new | 54 // Set the volume notifications object to be used when new |
59 // removable volumes are found. | 55 // removable volumes are found. |
60 void SetNotifications(StorageMonitor::Receiver* notifications); | 56 void SetNotifications(StorageMonitor::Receiver* notifications); |
61 | 57 |
62 protected: | 58 protected: |
63 typedef base::Callback<bool(const base::FilePath&, | 59 typedef base::Callback<bool(const base::FilePath&, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // The notifications object to use to signal newly attached volumes. Only | 123 // The notifications object to use to signal newly attached volumes. Only |
128 // removable devices will be notified. | 124 // removable devices will be notified. |
129 StorageMonitor::Receiver* notifications_; | 125 StorageMonitor::Receiver* notifications_; |
130 | 126 |
131 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); | 127 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); |
132 }; | 128 }; |
133 | 129 |
134 } // namespace chrome | 130 } // namespace chrome |
135 | 131 |
136 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 132 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
OLD | NEW |