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

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

Issue 2690323002: Make Interaction Media Features MQ dynamic on Windows. (Closed)
Patch Set: Nit fix Created 3 years, 8 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
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 bd7f1eafc134e854ef92988c329946b55db85324..3ccbb1b9f2a039c97a02bf4364ee4817b95e2b37 100644
--- a/ui/base/touch/touch_device_win.cc
+++ b/ui/base/touch/touch_device_win.cc
@@ -97,7 +97,21 @@ HoverType GetPrimaryHoverType(int available_hover_types) {
return HOVER_TYPE_NONE;
}
+bool return_available_pointer_and_hover_types_for_testing = false;
+int available_pointer_types_for_testing = POINTER_TYPE_NONE;
+int available_hover_types_for_testing = HOVER_TYPE_NONE;
+
+void SetAvailablePointerAndHoverTypesForTesting(int available_pointer_types,
+ int available_hover_types) {
+ return_available_pointer_and_hover_types_for_testing = true;
+ available_pointer_types_for_testing = available_pointer_types;
+ available_hover_types_for_testing = available_hover_types;
+}
+
std::pair<int, int> GetAvailablePointerAndHoverTypes() {
+ if (return_available_pointer_and_hover_types_for_testing)
+ return std::make_pair(available_pointer_types_for_testing,
+ available_hover_types_for_testing);
return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes());
}

Powered by Google App Engine
This is Rietveld 408576698