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

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 1679393002: Multiple DPI Tracking for ScreenWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Feedback EXCEPT rect_util Rename Created 4 years, 10 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
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 "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 17 matching lines...) Expand all
28 #include "ui/events/event_utils.h" 28 #include "ui/events/event_utils.h"
29 #include "ui/events/keycodes/keyboard_code_conversion_win.h" 29 #include "ui/events/keycodes/keyboard_code_conversion_win.h"
30 #include "ui/events/win/system_event_state_lookup.h" 30 #include "ui/events/win/system_event_state_lookup.h"
31 #include "ui/gfx/canvas.h" 31 #include "ui/gfx/canvas.h"
32 #include "ui/gfx/geometry/insets.h" 32 #include "ui/gfx/geometry/insets.h"
33 #include "ui/gfx/icon_util.h" 33 #include "ui/gfx/icon_util.h"
34 #include "ui/gfx/path.h" 34 #include "ui/gfx/path.h"
35 #include "ui/gfx/path_win.h" 35 #include "ui/gfx/path_win.h"
36 #include "ui/gfx/screen.h" 36 #include "ui/gfx/screen.h"
37 #include "ui/gfx/win/direct_manipulation.h" 37 #include "ui/gfx/win/direct_manipulation.h"
38 #include "ui/gfx/win/dpi.h"
39 #include "ui/gfx/win/hwnd_util.h" 38 #include "ui/gfx/win/hwnd_util.h"
40 #include "ui/native_theme/native_theme_win.h" 39 #include "ui/native_theme/native_theme_win.h"
41 #include "ui/views/views_delegate.h" 40 #include "ui/views/views_delegate.h"
42 #include "ui/views/widget/monitor_win.h" 41 #include "ui/views/widget/monitor_win.h"
43 #include "ui/views/widget/widget_hwnd_utils.h" 42 #include "ui/views/widget/widget_hwnd_utils.h"
44 #include "ui/views/win/fullscreen_handler.h" 43 #include "ui/views/win/fullscreen_handler.h"
45 #include "ui/views/win/hwnd_message_handler_delegate.h" 44 #include "ui/views/win/hwnd_message_handler_delegate.h"
46 #include "ui/views/win/scoped_fullscreen_visibility.h" 45 #include "ui/views/win/scoped_fullscreen_visibility.h"
47 #include "ui/views/win/windows_session_change_observer.h" 46 #include "ui/views/win/windows_session_change_observer.h"
48 47
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 // to add the scroll styles back to ensure that scrolling works in legacy 1383 // to add the scroll styles back to ensure that scrolling works in legacy
1385 // trackpoint drivers. 1384 // trackpoint drivers.
1386 if (in_size_loop_ && needs_scroll_styles_) 1385 if (in_size_loop_ && needs_scroll_styles_)
1387 AddScrollStylesToWindow(hwnd()); 1386 AddScrollStylesToWindow(hwnd());
1388 } 1387 }
1389 1388
1390 void HWNDMessageHandler::OnGetMinMaxInfo(MINMAXINFO* minmax_info) { 1389 void HWNDMessageHandler::OnGetMinMaxInfo(MINMAXINFO* minmax_info) {
1391 gfx::Size min_window_size; 1390 gfx::Size min_window_size;
1392 gfx::Size max_window_size; 1391 gfx::Size max_window_size;
1393 delegate_->GetMinMaxSize(&min_window_size, &max_window_size); 1392 delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
1394 min_window_size = gfx::win::DIPToScreenSize(min_window_size); 1393 min_window_size = delegate_->DIPToScreenSize(min_window_size);
1395 max_window_size = gfx::win::DIPToScreenSize(max_window_size); 1394 max_window_size = delegate_->DIPToScreenSize(max_window_size);
1396 1395
1397 1396
1398 // Add the native frame border size to the minimum and maximum size if the 1397 // Add the native frame border size to the minimum and maximum size if the
1399 // view reports its size as the client size. 1398 // view reports its size as the client size.
1400 if (delegate_->WidgetSizeIsClientSize()) { 1399 if (delegate_->WidgetSizeIsClientSize()) {
1401 RECT client_rect, window_rect; 1400 RECT client_rect, window_rect;
1402 GetClientRect(hwnd(), &client_rect); 1401 GetClientRect(hwnd(), &client_rect);
1403 GetWindowRect(hwnd(), &window_rect); 1402 GetWindowRect(hwnd(), &window_rect);
1404 CR_DEFLATE_RECT(&window_rect, &client_rect); 1403 CR_DEFLATE_RECT(&window_rect, &client_rect);
1405 min_window_size.Enlarge(window_rect.right - window_rect.left, 1404 min_window_size.Enlarge(window_rect.right - window_rect.left,
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 2569
2571 default: 2570 default:
2572 left_button_down_on_caption_ = false; 2571 left_button_down_on_caption_ = false;
2573 break; 2572 break;
2574 } 2573 }
2575 return handled; 2574 return handled;
2576 } 2575 }
2577 2576
2578 2577
2579 } // namespace views 2578 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ('k') | ui/views/win/hwnd_message_handler_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698