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

Unified Diff: chrome/browser/media_gallery/media_device_notifications_window_win.h

Issue 10211008: Moves media device notification code to chrome/browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed Comments Created 8 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698