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

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_window_win.h

Issue 11088012: [Win, MediaGallery] Enumerate and handle mtp device attach/detach events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/system_monitor/removable_device_notifications_window_win.h
diff --git a/chrome/browser/system_monitor/removable_device_notifications_window_win.h b/chrome/browser/system_monitor/removable_device_notifications_window_win.h
index 0fc83ae298a64e179b04841024a560b944129266..90321c04e16ab7b9a150679d37d20789023b66cb 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_window_win.h
+++ b/chrome/browser/system_monitor/removable_device_notifications_window_win.h
@@ -64,8 +64,11 @@ class RemovableDeviceNotificationsWindowWin
base::RefCountedThreadSafe<RemovableDeviceNotificationsWindowWin>;
friend class TestRemovableDeviceNotificationsWindowWin;
- typedef std::map<FilePath, std::string> MountPointDeviceIdMap;
+ // Key: Mass storage device mount point.
+ // Value: Mass storage device ID string.
+ typedef std::map<string16, std::string> MountPointDeviceIdMap;
+ // RemovableDeviceNotificationsWindowWin is ref-counted.
virtual ~RemovableDeviceNotificationsWindowWin();
static LRESULT CALLBACK WndProcThunk(HWND hwnd, UINT message, WPARAM wparam,
@@ -82,13 +85,23 @@ class RemovableDeviceNotificationsWindowWin
GetAttachedDevicesFunc get_attached_devices_func);
void CheckDeviceTypeOnFileThread(const std::string& unique_id,
- const FilePath::StringType& device_name,
+ const string16& device_name,
const FilePath& device);
- void ProcessDeviceAttachedOnUIThread(
+ // Handles removable mass storage device attach event on UI thread.
+ void HandleMassStorageDeviceAttachEventOnUIThread(
const std::string& device_id,
- const FilePath::StringType& device_name,
- const FilePath& device);
+ const string16& device_name,
+ const string16& device_location);
+
+ // Handles removable mass storage device detach event on UI thread.
+ void HandleMassStorageDeviceDetachEventOnUIThread(
+ const string16& device_location);
+
+ // Handles media transfer protocol device event on UI thread.
+ // |pnp_device_id| specifies the plug and play device ID string.
+ void HandleMtpDeviceEventOnUIThread(bool is_attach,
+ const string16& pnp_device_id);
// The window class of |window_|.
ATOM window_class_;

Powered by Google App Engine
This is Rietveld 408576698