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

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

Issue 2301073002: Optimization: avoid making 4 JNI calls to get touch device attributes. (Closed)
Patch Set: Created 4 years, 3 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.cc
diff --git a/ui/base/touch/touch_device.cc b/ui/base/touch/touch_device.cc
index 5b02be22965a4e56845470359660ccefaabd7acb..b9d302ab9315da6938023cb00ae769fa18da10c4 100644
--- a/ui/base/touch/touch_device.cc
+++ b/ui/base/touch/touch_device.cc
@@ -16,11 +16,20 @@ int MaxTouchPoints() {
return 0;
}
+std::pair<int, int> GetAvailablePointerAndHoverTypes() {
+ return std::make_pair(GetAvailablePointerTypes(), GetAvailableHoverTypes());
+}
+
int GetAvailablePointerTypes() {
// Assume a non-touch-device with a mouse
return POINTER_TYPE_FINE;
}
+PointerType GetPrimaryPointerType(int available_pointer_types) {
+ // Assume a non-touch-device with a mouse
+ return POINTER_TYPE_FINE;
+}
+
PointerType GetPrimaryPointerType() {
// Assume a non-touch-device with a mouse
return POINTER_TYPE_FINE;
@@ -31,6 +40,11 @@ int GetAvailableHoverTypes() {
return HOVER_TYPE_HOVER;
}
+HoverType GetPrimaryHoverType(int available_hover_types) {
+ // Assume a non-touch-device with a mouse
+ return HOVER_TYPE_HOVER;
+}
+
HoverType GetPrimaryHoverType() {
// Assume a non-touch-device with a mouse
return HOVER_TYPE_HOVER;

Powered by Google App Engine
This is Rietveld 408576698