Add ICU message format support
[chromium-blink-merge.git] / content / browser / system_message_window_win.h
blob43527da75caf156627341aa30f0aac15d773dd11
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_
8 #include <windows.h>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/profiler/scoped_tracker.h"
13 #include "content/common/content_export.h"
15 namespace content {
17 class CONTENT_EXPORT SystemMessageWindowWin {
18 public:
19 SystemMessageWindowWin();
21 virtual ~SystemMessageWindowWin();
23 virtual LRESULT OnDeviceChange(UINT event_type, LPARAM data);
25 private:
26 void Init();
28 LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
29 WPARAM wparam, LPARAM lparam);
31 static LRESULT CALLBACK WndProcThunk(HWND hwnd,
32 UINT message,
33 WPARAM wparam,
34 LPARAM lparam) {
35 SystemMessageWindowWin* msg_wnd = reinterpret_cast<SystemMessageWindowWin*>(
36 GetWindowLongPtr(hwnd, GWLP_USERDATA));
37 if (msg_wnd)
38 return msg_wnd->WndProc(hwnd, message, wparam, lparam);
39 return ::DefWindowProc(hwnd, message, wparam, lparam);
42 HMODULE instance_;
43 HWND window_;
44 class DeviceNotifications;
45 scoped_ptr<DeviceNotifications> device_notifications_;
47 DISALLOW_COPY_AND_ASSIGN(SystemMessageWindowWin);
50 } // namespace content
52 #endif // CONTENT_BROWSER_SYSTEM_MESSAGE_WINDOW_WIN_H_