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

Side by Side Diff: chrome/browser/system_monitor/removable_device_notifications_window_win.h

Issue 10919173: Rename Windows SystemMonitor implementation files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win unit test Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_ H_
6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_ H_
7
8 #include <windows.h>
9
10 #include <string>
11
12 #include "base/basictypes.h"
13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h"
15
16 typedef LRESULT (*VolumeNameFunc)(LPCWSTR drive,
17 LPWSTR volume_name,
18 unsigned int volume_name_len);
19 namespace chrome {
20
21 class RemovableDeviceNotificationsWindowWin
22 : public base::RefCountedThreadSafe<RemovableDeviceNotificationsWindowWin> {
23 public:
24 RemovableDeviceNotificationsWindowWin();
25 // Only for use in unit tests.
26 explicit RemovableDeviceNotificationsWindowWin(VolumeNameFunc volumeNameFunc);
27
28 LRESULT OnDeviceChange(UINT event_type, DWORD data);
29
30 private:
31 friend class
32 base::RefCountedThreadSafe<RemovableDeviceNotificationsWindowWin>;
33
34 virtual ~RemovableDeviceNotificationsWindowWin();
35
36 void Init();
37
38 LRESULT CALLBACK WndProc(HWND hwnd,
39 UINT message,
40 WPARAM wparam,
41 LPARAM lparam);
42
43 static LRESULT CALLBACK WndProcThunk(HWND hwnd,
44 UINT message,
45 WPARAM wparam,
46 LPARAM lparam);
47
48 void CheckDeviceTypeOnFileThread(const std::string& id,
49 const FilePath::StringType& device_name,
50 const FilePath& path);
51
52 void ProcessRemovableDeviceAttachedOnUIThread(
53 const std::string& id,
54 const FilePath::StringType& device_name,
55 const FilePath& path);
56
57 // The window class of |window_|.
58 ATOM atom_;
59
60 // The handle of the module that contains the window procedure of |window_|.
61 HMODULE instance_;
62
63 HWND window_;
64 VolumeNameFunc volume_name_func_;
65
66 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsWindowWin);
67 };
68
69 } // namespace chrome
70
71 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_W IN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698