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

Side by Side Diff: content/browser/system_message_window_win.h

Issue 8523021: Send WM_DEVICECHANGE message through SystemMonitor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add new window to handle system-level messages Created 9 years, 1 month 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/system_message_window_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 CONTENT_BROWSER_SYSTEM_MESSAGE_WINDOW_WIN_H_
6 #define CONTENT_BROWSER_SYSTEM_MESSAGE_WINDOW_WIN_H_
7 #pragma once
8
9 #include "build/build_config.h"
10
11 #if defined(OS_WIN)
jam 2011/11/14 18:48:13 better to include this file only for windows, and
12 #include <windows.h>
13 #endif // defined(OS_WIN)
14
15 #include "base/basictypes.h"
16 #include "content/common/content_export.h"
17
18 class CONTENT_EXPORT SystemMessageWindowWin {
19 public:
20 SystemMessageWindowWin();
21 virtual ~SystemMessageWindowWin();
22
23 virtual LRESULT OnDeviceChange(UINT event_type, DWORD data);
24
25 private:
26 LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
27 WPARAM wparam, LPARAM lparam);
28
29 static LRESULT CALLBACK WndProcThunk(HWND hwnd,
30 UINT message,
31 WPARAM wparam,
32 LPARAM lparam) {
33 SystemMessageWindowWin* msg_wnd = reinterpret_cast<SystemMessageWindowWin*>(
34 GetWindowLongPtr(hwnd, GWLP_USERDATA));
35 if (msg_wnd)
36 return msg_wnd->WndProc(hwnd, message, wparam, lparam);
37 return ::DefWindowProc(hwnd, message, wparam, lparam);
38 }
39
40 HWND window_;
41
42 DISALLOW_COPY_AND_ASSIGN(SystemMessageWindowWin);
43 };
44
45 #endif // CONTENT_BROWSER_SYSTEM_MESSAGE_WINDOW_WIN_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/system_message_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698