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

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

Issue 2909943003: Removing useless Win7 checks + standardize its use (Closed)
Patch Set: Various nits Created 3 years, 6 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
« no previous file with comments | « ui/gl/vsync_provider_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 if (get_pointer_type && get_pointer_type(pointer_id, &pointer_type) && 1651 if (get_pointer_type && get_pointer_type(pointer_id, &pointer_type) &&
1652 pointer_type == PT_TOUCHPAD) 1652 pointer_type == PT_TOUCHPAD)
1653 return PA_NOACTIVATE; 1653 return PA_NOACTIVATE;
1654 SetMsgHandled(FALSE); 1654 SetMsgHandled(FALSE);
1655 return -1; 1655 return -1;
1656 } 1656 }
1657 1657
1658 LRESULT HWNDMessageHandler::OnPointerEvent(UINT message, 1658 LRESULT HWNDMessageHandler::OnPointerEvent(UINT message,
1659 WPARAM w_param, 1659 WPARAM w_param,
1660 LPARAM l_param) { 1660 LPARAM l_param) {
1661 // WM_POINTER is not supported on Windows 7 or lower. 1661 // WM_POINTER is not supported on Windows 7.
1662 if (base::win::GetVersion() <= base::win::VERSION_WIN7) { 1662 if (base::win::GetVersion() == base::win::VERSION_WIN7) {
1663 SetMsgHandled(FALSE); 1663 SetMsgHandled(FALSE);
1664 return -1; 1664 return -1;
1665 } 1665 }
1666 1666
1667 UINT32 pointer_id = GET_POINTERID_WPARAM(w_param); 1667 UINT32 pointer_id = GET_POINTERID_WPARAM(w_param);
1668 using GetPointerTypeFn = BOOL(WINAPI*)(UINT32, POINTER_INPUT_TYPE*); 1668 using GetPointerTypeFn = BOOL(WINAPI*)(UINT32, POINTER_INPUT_TYPE*);
1669 POINTER_INPUT_TYPE pointer_type; 1669 POINTER_INPUT_TYPE pointer_type;
1670 static GetPointerTypeFn get_pointer_type = reinterpret_cast<GetPointerTypeFn>( 1670 static GetPointerTypeFn get_pointer_type = reinterpret_cast<GetPointerTypeFn>(
1671 GetProcAddress(GetModuleHandleA("user32.dll"), "GetPointerType")); 1671 GetProcAddress(GetModuleHandleA("user32.dll"), "GetPointerType"));
1672 // If the WM_POINTER messages are not sent from a stylus device, then we do 1672 // If the WM_POINTER messages are not sent from a stylus device, then we do
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 MONITORINFO monitor_info = {sizeof(monitor_info)}; 2913 MONITORINFO monitor_info = {sizeof(monitor_info)};
2914 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), 2914 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY),
2915 &monitor_info); 2915 &monitor_info);
2916 gfx::Rect shrunk_rect(monitor_info.rcMonitor); 2916 gfx::Rect shrunk_rect(monitor_info.rcMonitor);
2917 shrunk_rect.set_height(shrunk_rect.height() - 1); 2917 shrunk_rect.set_height(shrunk_rect.height() - 1);
2918 background_fullscreen_hack_ = true; 2918 background_fullscreen_hack_ = true;
2919 SetBoundsInternal(shrunk_rect, false); 2919 SetBoundsInternal(shrunk_rect, false);
2920 } 2920 }
2921 2921
2922 } // namespace views 2922 } // namespace views
OLDNEW
« no previous file with comments | « ui/gl/vsync_provider_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698