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

Unified Diff: ui/base/touch/touch_device_win.cc

Issue 2673963002: Drop hover:on-demand support & let touch-screens report "none" instead. (Closed)
Patch Set: bokan's comments. Created 3 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 side-by-side diff with in-line comments
Download patch
« ui/base/touch/touch_device_linux.cc ('K') | « ui/base/touch/touch_device_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/touch/touch_device_win.cc
diff --git a/ui/base/touch/touch_device_win.cc b/ui/base/touch/touch_device_win.cc
index 0e1655f40b2a5568f1e42abc2ef401eb2fb0a535..414648b756cfbfacea87fbd553b0eb45718d8717 100644
--- a/ui/base/touch/touch_device_win.cc
+++ b/ui/base/touch/touch_device_win.cc
@@ -32,16 +32,8 @@ int GetAvailablePointerTypes() {
}
int GetAvailableHoverTypes() {
- int available_hover_types = 0;
- if (IsTouchDevicePresent())
- available_hover_types |= HOVER_TYPE_ON_DEMAND;
- if (GetSystemMetrics(SM_MOUSEPRESENT) != 0)
- available_hover_types |= HOVER_TYPE_HOVER;
-
- if (available_hover_types == 0)
- available_hover_types = HOVER_TYPE_NONE;
-
- return available_hover_types;
+ return (GetSystemMetrics(SM_MOUSEPRESENT) != 0) ? HOVER_TYPE_HOVER
Rick Byers 2017/02/06 16:35:22 Again there should still be three possible states
mustaq 2017/02/06 17:13:02 Done.
+ : HOVER_TYPE_NONE;
}
} // namespace
@@ -72,8 +64,6 @@ PointerType GetPrimaryPointerType(int available_pointer_types) {
HoverType GetPrimaryHoverType(int available_hover_types) {
if (available_hover_types & HOVER_TYPE_HOVER)
return HOVER_TYPE_HOVER;
- if (available_hover_types & HOVER_TYPE_ON_DEMAND)
- return HOVER_TYPE_ON_DEMAND;
DCHECK_EQ(available_hover_types, HOVER_TYPE_NONE);
return HOVER_TYPE_NONE;
}
« ui/base/touch/touch_device_linux.cc ('K') | « ui/base/touch/touch_device_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698