OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "views/widget/native_widget_win.h" | 5 #include "views/widget/native_widget_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 } | 1202 } |
1203 | 1203 |
1204 void NativeWidgetWin::OnDestroy() { | 1204 void NativeWidgetWin::OnDestroy() { |
1205 delegate_->OnNativeWidgetDestroying(); | 1205 delegate_->OnNativeWidgetDestroying(); |
1206 if (drop_target_.get()) { | 1206 if (drop_target_.get()) { |
1207 RevokeDragDrop(hwnd()); | 1207 RevokeDragDrop(hwnd()); |
1208 drop_target_ = NULL; | 1208 drop_target_ = NULL; |
1209 } | 1209 } |
1210 } | 1210 } |
1211 | 1211 |
| 1212 LRESULT NativeWidgetWin::OnDeviceChange(UINT event_type, DWORD data) { |
| 1213 base::SystemMonitor* monitor = base::SystemMonitor::Get(); |
| 1214 if (monitor && event_type == DBT_DEVNODES_CHANGED) |
| 1215 monitor->ProcessDeviceChange(); |
| 1216 SetMsgHandled(FALSE); |
| 1217 return TRUE; |
| 1218 } |
| 1219 |
1212 void NativeWidgetWin::OnDisplayChange(UINT bits_per_pixel, CSize screen_size) { | 1220 void NativeWidgetWin::OnDisplayChange(UINT bits_per_pixel, CSize screen_size) { |
1213 GetWidget()->widget_delegate()->OnDisplayChanged(); | 1221 GetWidget()->widget_delegate()->OnDisplayChanged(); |
1214 } | 1222 } |
1215 | 1223 |
1216 LRESULT NativeWidgetWin::OnDwmCompositionChanged(UINT msg, | 1224 LRESULT NativeWidgetWin::OnDwmCompositionChanged(UINT msg, |
1217 WPARAM w_param, | 1225 WPARAM w_param, |
1218 LPARAM l_param) { | 1226 LPARAM l_param) { |
1219 if (!GetWidget()->non_client_view()) { | 1227 if (!GetWidget()->non_client_view()) { |
1220 SetMsgHandled(FALSE); | 1228 SetMsgHandled(FALSE); |
1221 return 0; | 1229 return 0; |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2516 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2524 return (GetKeyState(VK_LBUTTON) & 0x80) || |
2517 (GetKeyState(VK_RBUTTON) & 0x80) || | 2525 (GetKeyState(VK_RBUTTON) & 0x80) || |
2518 (GetKeyState(VK_MBUTTON) & 0x80) || | 2526 (GetKeyState(VK_MBUTTON) & 0x80) || |
2519 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2527 (GetKeyState(VK_XBUTTON1) & 0x80) || |
2520 (GetKeyState(VK_XBUTTON2) & 0x80); | 2528 (GetKeyState(VK_XBUTTON2) & 0x80); |
2521 } | 2529 } |
2522 | 2530 |
2523 } // namespace internal | 2531 } // namespace internal |
2524 | 2532 |
2525 } // namespace views | 2533 } // namespace views |
OLD | NEW |