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

Unified Diff: views/widget/native_widget_win.cc

Issue 8523021: Send WM_DEVICECHANGE message through SystemMonitor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: views/widget/native_widget_win.cc
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc
index e31196e0b67a936a1eadbfc9748978aca0b9abaf..3942a2ffc29f6b50cacfe4e1a5675cf812c331a9 100644
--- a/views/widget/native_widget_win.cc
+++ b/views/widget/native_widget_win.cc
@@ -1209,6 +1209,14 @@ void NativeWidgetWin::OnDestroy() {
}
}
+LRESULT NativeWidgetWin::OnDeviceChange(UINT event_type, DWORD data) {
+ base::SystemMonitor* monitor = base::SystemMonitor::Get();
+ if (monitor && event_type == DBT_DEVNODES_CHANGED)
+ monitor->ProcessDeviceChange();
+ SetMsgHandled(FALSE);
+ return TRUE;
+}
+
void NativeWidgetWin::OnDisplayChange(UINT bits_per_pixel, CSize screen_size) {
GetWidget()->widget_delegate()->OnDisplayChanged();
}
« base/system_monitor/system_monitor_unittest.cc ('K') | « views/widget/native_widget_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698