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(); |
} |