| OLD | NEW |
| 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 "ui/views/win/hwnd_message_handler.h" | 5 #include "ui/views/win/hwnd_message_handler.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <oleacc.h> | 8 #include <oleacc.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #include <tchar.h> | 10 #include <tchar.h> |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 // set at the current scale factor and may cause the window to display too | 1411 // set at the current scale factor and may cause the window to display too |
| 1412 // soon. See http://crbug.com/625076. | 1412 // soon. See http://crbug.com/625076. |
| 1413 int dpi = LOWORD(w_param); | 1413 int dpi = LOWORD(w_param); |
| 1414 if (dpi_ == dpi) | 1414 if (dpi_ == dpi) |
| 1415 return 0; | 1415 return 0; |
| 1416 | 1416 |
| 1417 dpi_ = dpi; | 1417 dpi_ = dpi; |
| 1418 SetBoundsInternal(gfx::Rect(*reinterpret_cast<RECT*>(l_param)), false); | 1418 SetBoundsInternal(gfx::Rect(*reinterpret_cast<RECT*>(l_param)), false); |
| 1419 delegate_->HandleWindowScaleFactorChanged( | 1419 delegate_->HandleWindowScaleFactorChanged( |
| 1420 display::win::GetScalingFactorFromDPI(dpi_)); | 1420 display::win::GetScalingFactorFromDPI(dpi_)); |
| 1421 |
| 1422 LOG(ERROR) << "HWNDMessageHandler::OnDpiChanged(" << dpi << ")"; |
| 1421 return 0; | 1423 return 0; |
| 1422 } | 1424 } |
| 1423 | 1425 |
| 1424 void HWNDMessageHandler::OnEnterMenuLoop(BOOL from_track_popup_menu) { | 1426 void HWNDMessageHandler::OnEnterMenuLoop(BOOL from_track_popup_menu) { |
| 1425 if (menu_depth_++ == 0) | 1427 if (menu_depth_++ == 0) |
| 1426 delegate_->HandleMenuLoop(true); | 1428 delegate_->HandleMenuLoop(true); |
| 1427 } | 1429 } |
| 1428 | 1430 |
| 1429 void HWNDMessageHandler::OnEnterSizeMove() { | 1431 void HWNDMessageHandler::OnEnterSizeMove() { |
| 1430 delegate_->HandleBeginWMSizeMove(); | 1432 delegate_->HandleBeginWMSizeMove(); |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2713 MONITORINFO monitor_info = {sizeof(monitor_info)}; | 2715 MONITORINFO monitor_info = {sizeof(monitor_info)}; |
| 2714 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), | 2716 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), |
| 2715 &monitor_info); | 2717 &monitor_info); |
| 2716 gfx::Rect shrunk_rect(monitor_info.rcMonitor); | 2718 gfx::Rect shrunk_rect(monitor_info.rcMonitor); |
| 2717 shrunk_rect.set_height(shrunk_rect.height() - 1); | 2719 shrunk_rect.set_height(shrunk_rect.height() - 1); |
| 2718 background_fullscreen_hack_ = true; | 2720 background_fullscreen_hack_ = true; |
| 2719 SetBoundsInternal(shrunk_rect, false); | 2721 SetBoundsInternal(shrunk_rect, false); |
| 2720 } | 2722 } |
| 2721 | 2723 |
| 2722 } // namespace views | 2724 } // namespace views |
| OLD | NEW |