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.
5 #ifndef CONTENT_BROWSER_SYSTEM_MESSAGE_WINDOW_WIN_H_
6 #define CONTENT_BROWSER_SYSTEM_MESSAGE_WINDOW_WIN_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/common/content_export.h"
16 class CONTENT_EXPORT SystemMessageWindowWin {
18 SystemMessageWindowWin();
20 virtual ~SystemMessageWindowWin();
22 virtual LRESULT OnDeviceChange(UINT event_type, LPARAM data);
27 LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
28 WPARAM wparam, LPARAM lparam);
30 static LRESULT CALLBACK WndProcThunk(HWND hwnd,
34 SystemMessageWindowWin* msg_wnd = reinterpret_cast<SystemMessageWindowWin*>(
35 GetWindowLongPtr(hwnd, GWLP_USERDATA));
37 return msg_wnd->WndProc(hwnd, message, wparam, lparam);
38 return ::DefWindowProc(hwnd, message, wparam, lparam);
43 class DeviceNotifications;
44 scoped_ptr<DeviceNotifications> device_notifications_;
46 DISALLOW_COPY_AND_ASSIGN(SystemMessageWindowWin);
49 } // namespace content
51 #endif // CONTENT_BROWSER_SYSTEM_MESSAGE_WINDOW_WIN_H_