Index: chrome/browser/media_gallery/media_device_notifications_window_win.h |
diff --git a/chrome/browser/media_gallery/media_device_notifications_window_win.h b/chrome/browser/media_gallery/media_device_notifications_window_win.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ebf7153b0e1a2cb965b2a406b6b654f632c2ce18 |
--- /dev/null |
+++ b/chrome/browser/media_gallery/media_device_notifications_window_win.h |
@@ -0,0 +1,49 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_WINDOW_WIN_H_ |
+#define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_WINDOW_WIN_H_ |
+#pragma once |
+ |
+#include <windows.h> |
+ |
+#include "base/basictypes.h" |
+ |
+typedef LRESULT (*VolumeNameFunc)(LPCWSTR drive, |
+ LPWSTR volume_name, |
+ unsigned int volume_name_len); |
+namespace chrome { |
+ |
+class MediaDeviceNotificationsWindowWin { |
+ public: |
+ MediaDeviceNotificationsWindowWin(); |
+ // Only for use in unit tests. |
+ explicit MediaDeviceNotificationsWindowWin(VolumeNameFunc volumeNameFunc); |
+ |
+ virtual ~MediaDeviceNotificationsWindowWin(); |
+ |
+ virtual LRESULT OnDeviceChange(UINT event_type, DWORD data); |
+ |
+ private: |
+ void Init(); |
+ |
+ LRESULT CALLBACK WndProc(HWND hwnd, |
+ UINT message, |
+ WPARAM wparam, |
+ LPARAM lparam); |
+ |
+ static LRESULT CALLBACK WndProcThunk(HWND hwnd, |
+ UINT message, |
+ WPARAM wparam, |
+ LPARAM lparam); |
+ |
+ HWND window_; |
+ VolumeNameFunc volume_name_func_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MediaDeviceNotificationsWindowWin); |
+}; |
+ |
+} // namespace chrome |
+ |
+#endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_WINDOW_WIN_H_ |