| 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 26554862ef7e8b376699486f02d5bbc5ae5bd427..0e1655f40b2a5568f1e42abc2ef401eb2fb0a535 100644
|
| --- a/ui/base/touch/touch_device_win.cc
|
| +++ b/ui/base/touch/touch_device_win.cc
|
| @@ -17,22 +17,6 @@ bool IsTouchDevicePresent() {
|
| ((value & NID_INTEGRATED_TOUCH) || (value & NID_EXTERNAL_TOUCH));
|
| }
|
|
|
| -} // namespace
|
| -
|
| -TouchScreensAvailability GetTouchScreensAvailability() {
|
| - if (!IsTouchDevicePresent())
|
| - return TouchScreensAvailability::NONE;
|
| -
|
| - return TouchScreensAvailability::ENABLED;
|
| -}
|
| -
|
| -int MaxTouchPoints() {
|
| - if (!IsTouchDevicePresent())
|
| - return 0;
|
| -
|
| - return GetSystemMetrics(SM_MAXIMUMTOUCHES);
|
| -}
|
| -
|
| int GetAvailablePointerTypes() {
|
| int available_pointer_types = 0;
|
| if (IsTouchDevicePresent())
|
| @@ -47,16 +31,6 @@ int GetAvailablePointerTypes() {
|
| return available_pointer_types;
|
| }
|
|
|
| -PointerType GetPrimaryPointerType() {
|
| - int available_pointer_types = GetAvailablePointerTypes();
|
| - if (available_pointer_types & POINTER_TYPE_FINE)
|
| - return POINTER_TYPE_FINE;
|
| - if (available_pointer_types & POINTER_TYPE_COARSE)
|
| - return POINTER_TYPE_COARSE;
|
| - DCHECK_EQ(available_pointer_types, POINTER_TYPE_NONE);
|
| - return POINTER_TYPE_NONE;
|
| -}
|
| -
|
| int GetAvailableHoverTypes() {
|
| int available_hover_types = 0;
|
| if (IsTouchDevicePresent())
|
| @@ -70,8 +44,32 @@ int GetAvailableHoverTypes() {
|
| return available_hover_types;
|
| }
|
|
|
| -HoverType GetPrimaryHoverType() {
|
| - int available_hover_types = GetAvailableHoverTypes();
|
| +} // namespace
|
| +
|
| +TouchScreensAvailability GetTouchScreensAvailability() {
|
| + if (!IsTouchDevicePresent())
|
| + return TouchScreensAvailability::NONE;
|
| +
|
| + return TouchScreensAvailability::ENABLED;
|
| +}
|
| +
|
| +int MaxTouchPoints() {
|
| + if (!IsTouchDevicePresent())
|
| + return 0;
|
| +
|
| + return GetSystemMetrics(SM_MAXIMUMTOUCHES);
|
| +}
|
| +
|
| +PointerType GetPrimaryPointerType(int available_pointer_types) {
|
| + if (available_pointer_types & POINTER_TYPE_FINE)
|
| + return POINTER_TYPE_FINE;
|
| + if (available_pointer_types & POINTER_TYPE_COARSE)
|
| + return POINTER_TYPE_COARSE;
|
| + DCHECK_EQ(available_pointer_types, POINTER_TYPE_NONE);
|
| + return POINTER_TYPE_NONE;
|
| +}
|
| +
|
| +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)
|
| @@ -80,4 +78,8 @@ HoverType GetPrimaryHoverType() {
|
| return HOVER_TYPE_NONE;
|
| }
|
|
|
| +std::pair<int, int> GetAvailablePointerAndHoverTypes() {
|
| + return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes());
|
| +}
|
| +
|
| } // namespace ui
|
|
|