Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: components/storage_monitor/volume_mount_watcher_win.h

Issue 231063002: Add notification for media changed, and notify volume mount watcher when it occurs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Name and constant change Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 OnMediaChange(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
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_
OLDNEW
« no previous file with comments | « components/storage_monitor/storage_monitor_win.cc ('k') | components/storage_monitor/volume_mount_watcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698