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

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

Issue 10836004: add device type as an argument in OnDevicesChanged. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix indent Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/system_message_window_win.h" 5 #include "content/browser/system_message_window_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <dbt.h> 8 #include <dbt.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 23 matching lines...) Expand all
34 if (window_) { 34 if (window_) {
35 DestroyWindow(window_); 35 DestroyWindow(window_);
36 UnregisterClass(WindowClassName, instance_); 36 UnregisterClass(WindowClassName, instance_);
37 } 37 }
38 } 38 }
39 39
40 LRESULT SystemMessageWindowWin::OnDeviceChange(UINT event_type, DWORD data) { 40 LRESULT SystemMessageWindowWin::OnDeviceChange(UINT event_type, DWORD data) {
41 base::SystemMonitor* monitor = base::SystemMonitor::Get(); 41 base::SystemMonitor* monitor = base::SystemMonitor::Get();
42 switch (event_type) { 42 switch (event_type) {
43 case DBT_DEVNODES_CHANGED: 43 case DBT_DEVNODES_CHANGED:
44 monitor->ProcessDevicesChanged(); 44 monitor->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN);
45 break; 45 break;
46 } 46 }
47 return TRUE; 47 return TRUE;
48 } 48 }
49 49
50 LRESULT CALLBACK SystemMessageWindowWin::WndProc(HWND hwnd, UINT message, 50 LRESULT CALLBACK SystemMessageWindowWin::WndProc(HWND hwnd, UINT message,
51 WPARAM wparam, LPARAM lparam) { 51 WPARAM wparam, LPARAM lparam) {
52 switch (message) { 52 switch (message) {
53 case WM_DEVICECHANGE: 53 case WM_DEVICECHANGE:
54 return OnDeviceChange(static_cast<UINT>(wparam), 54 return OnDeviceChange(static_cast<UINT>(wparam),
55 static_cast<DWORD>(lparam)); 55 static_cast<DWORD>(lparam));
56 default: 56 default:
57 break; 57 break;
58 } 58 }
59 59
60 return ::DefWindowProc(hwnd, message, wparam, lparam); 60 return ::DefWindowProc(hwnd, message, wparam, lparam);
61 } 61 }
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_provider.cc ('k') | content/browser/system_message_window_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698