| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 5 #ifndef COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
| 6 #define COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 6 #define COMPONENTS_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Gets the information about the device mounted at |device_path|. On success, | 42 // Gets the information about the device mounted at |device_path|. On success, |
| 43 // returns true and fills in |info|. | 43 // returns true and fills in |info|. |
| 44 // Can block during startup while device info is still loading. | 44 // Can block during startup while device info is still loading. |
| 45 bool GetDeviceInfo(const base::FilePath& device_path, | 45 bool GetDeviceInfo(const base::FilePath& device_path, |
| 46 StorageInfo* info) const; | 46 StorageInfo* info) const; |
| 47 | 47 |
| 48 // Processes DEV_BROADCAST_VOLUME messages and triggers a | 48 // Processes DEV_BROADCAST_VOLUME messages and triggers a |
| 49 // notification if appropriate. | 49 // notification if appropriate. |
| 50 void OnWindowMessage(UINT event_type, LPARAM data); | 50 void OnWindowMessage(UINT event_type, LPARAM data); |
| 51 | 51 |
| 52 // Processes SHCNE_MEDIAINSERTED (and REMOVED). |
| 53 void OnMediaChanged(WPARAM wparam, LPARAM lparam); |
| 54 |
| 52 // Set the volume notifications object to be used when new | 55 // Set the volume notifications object to be used when new |
| 53 // removable volumes are found. | 56 // removable volumes are found. |
| 54 void SetNotifications(StorageMonitor::Receiver* notifications); | 57 void SetNotifications(StorageMonitor::Receiver* notifications); |
| 55 | 58 |
| 56 void EjectDevice(const std::string& device_id, | 59 void EjectDevice(const std::string& device_id, |
| 57 base::Callback<void(StorageMonitor::EjectStatus)> callback); | 60 base::Callback<void(StorageMonitor::EjectStatus)> callback); |
| 58 | 61 |
| 59 protected: | 62 protected: |
| 60 typedef base::Callback<bool(const base::FilePath&, | 63 typedef base::Callback<bool(const base::FilePath&, |
| 61 StorageInfo*)> GetDeviceDetailsCallbackType; | 64 StorageInfo*)> GetDeviceDetailsCallbackType; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // The notifications object to use to signal newly attached volumes. Only | 117 // The notifications object to use to signal newly attached volumes. Only |
| 115 // removable devices will be notified. | 118 // removable devices will be notified. |
| 116 StorageMonitor::Receiver* notifications_; | 119 StorageMonitor::Receiver* notifications_; |
| 117 | 120 |
| 118 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); | 121 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 } // namespace storage_monitor | 124 } // namespace storage_monitor |
| 122 | 125 |
| 123 #endif // COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 126 #endif // COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
| OLD | NEW |