| 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..62fd6a4bd9352daeaf5ddf12966e00c9924a41d9 100644
|
| --- a/ui/base/touch/touch_device_win.cc
|
| +++ b/ui/base/touch/touch_device_win.cc
|
| @@ -33,6 +33,10 @@ int MaxTouchPoints() {
|
| return GetSystemMetrics(SM_MAXIMUMTOUCHES);
|
| }
|
|
|
| +std::pair<int, int> GetAvailablePointerAndHoverTypes() {
|
| + return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes());
|
| +}
|
| +
|
| int GetAvailablePointerTypes() {
|
| int available_pointer_types = 0;
|
| if (IsTouchDevicePresent())
|
| @@ -47,8 +51,7 @@ int GetAvailablePointerTypes() {
|
| return available_pointer_types;
|
| }
|
|
|
| -PointerType GetPrimaryPointerType() {
|
| - int available_pointer_types = GetAvailablePointerTypes();
|
| +PointerType GetPrimaryPointerType(int available_pointer_types) {
|
| if (available_pointer_types & POINTER_TYPE_FINE)
|
| return POINTER_TYPE_FINE;
|
| if (available_pointer_types & POINTER_TYPE_COARSE)
|
| @@ -57,6 +60,10 @@ PointerType GetPrimaryPointerType() {
|
| return POINTER_TYPE_NONE;
|
| }
|
|
|
| +PointerType GetPrimaryPointerType() {
|
| + return GetPrimaryPointerType(GetAvailablePointerTypes());
|
| +}
|
| +
|
| int GetAvailableHoverTypes() {
|
| int available_hover_types = 0;
|
| if (IsTouchDevicePresent())
|
| @@ -70,8 +77,7 @@ int GetAvailableHoverTypes() {
|
| return available_hover_types;
|
| }
|
|
|
| -HoverType GetPrimaryHoverType() {
|
| - int available_hover_types = GetAvailableHoverTypes();
|
| +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 +86,8 @@ HoverType GetPrimaryHoverType() {
|
| return HOVER_TYPE_NONE;
|
| }
|
|
|
| +HoverType GetPrimaryHoverType() {
|
| + return GetPrimaryHoverType(GetAvailableHoverTypes());
|
| +}
|
| +
|
| } // namespace ui
|
|
|