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

Side by Side Diff: chrome/browser/storage_monitor/portable_device_watcher_win.h

Issue 12382005: Rename RemovableDeviceNotifications=>StorageMonitor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more indentation issues. Created 7 years, 9 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 (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_PORTABLE_DEVICE_WATCHER_WIN_H_ 5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_PORTABLE_DEVICE_WATCHER_WIN_H_
6 #define CHROME_BROWSER_STORAGE_MONITOR_PORTABLE_DEVICE_WATCHER_WIN_H_ 6 #define CHROME_BROWSER_STORAGE_MONITOR_PORTABLE_DEVICE_WATCHER_WIN_H_
7 7
8 #include <portabledeviceapi.h> 8 #include <portabledeviceapi.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 namespace chrome { 23 namespace chrome {
24 24
25 namespace test { 25 namespace test {
26 class TestPortableDeviceWatcherWin; 26 class TestPortableDeviceWatcherWin;
27 } 27 }
28 28
29 // This class watches the portable device mount points and sends notifications 29 // This class watches the portable device mount points and sends notifications
30 // about the attached/detached media transfer protocol (MTP) devices. 30 // about the attached/detached media transfer protocol (MTP) devices.
31 // This is a singleton class instantiated by 31 // This is a singleton class instantiated by
vandebo (ex-Chrome) 2013/03/02 00:23:37 re-line wrap
32 // RemovableDeviceNotificationsWindowWin. This class is created, destroyed and 32 // StorageMonitorWin. This class is created, destroyed and
33 // operates on the UI thread, except for long running tasks it spins off to a 33 // operates on the UI thread, except for long running tasks it spins off to a
34 // SequencedTaskRunner. 34 // SequencedTaskRunner.
35 class PortableDeviceWatcherWin { 35 class PortableDeviceWatcherWin {
36 public: 36 public:
37 typedef std::vector<string16> StorageObjectIDs; 37 typedef std::vector<string16> StorageObjectIDs;
38 38
39 struct DeviceStorageObject { 39 struct DeviceStorageObject {
40 DeviceStorageObject(const string16& temporary_id, 40 DeviceStorageObject(const string16& temporary_id,
41 const std::string& persistent_id); 41 const std::string& persistent_id);
42 42
(...skipping 21 matching lines...) Expand all
64 StorageObjects storage_objects; 64 StorageObjects storage_objects;
65 }; 65 };
66 typedef std::vector<DeviceDetails> Devices; 66 typedef std::vector<DeviceDetails> Devices;
67 67
68 // TODO(gbillock): Change to take the device notifications object as 68 // TODO(gbillock): Change to take the device notifications object as
69 // an argument. 69 // an argument.
70 PortableDeviceWatcherWin(); 70 PortableDeviceWatcherWin();
71 virtual ~PortableDeviceWatcherWin(); 71 virtual ~PortableDeviceWatcherWin();
72 72
73 // Must be called after the browser blocking pool is ready for use. 73 // Must be called after the browser blocking pool is ready for use.
74 // RemovableDeviceNotificationsWindowsWin::Init() will call this function. 74 // StorageMonitorWin::Init() will call this function.
75 void Init(HWND hwnd); 75 void Init(HWND hwnd);
76 76
77 // Processes DEV_BROADCAST_DEVICEINTERFACE messages and triggers a 77 // Processes DEV_BROADCAST_DEVICEINTERFACE messages and triggers a
78 // notification if appropriate. 78 // notification if appropriate.
79 void OnWindowMessage(UINT event_type, LPARAM data); 79 void OnWindowMessage(UINT event_type, LPARAM data);
80 80
81 // Gets the information of the MTP storage specified by |storage_device_id|. 81 // Gets the information of the MTP storage specified by |storage_device_id|.
82 // On success, returns true and fills in |device_location| with device 82 // On success, returns true and fills in |device_location| with device
83 // interface details and |storage_object_id| with storage object temporary 83 // interface details and |storage_object_id| with storage object temporary
84 // identifier. 84 // identifier.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // The notifications object to use to signal newly attached devices. 139 // The notifications object to use to signal newly attached devices.
140 StorageMonitor::Receiver* storage_notifications_; 140 StorageMonitor::Receiver* storage_notifications_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(PortableDeviceWatcherWin); 142 DISALLOW_COPY_AND_ASSIGN(PortableDeviceWatcherWin);
143 }; 143 };
144 144
145 } // namespace chrome 145 } // namespace chrome
146 146
147 #endif // CHROME_BROWSER_STORAGE_MONITOR_PORTABLE_DEVICE_WATCHER_WIN_H_ 147 #endif // CHROME_BROWSER_STORAGE_MONITOR_PORTABLE_DEVICE_WATCHER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698