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

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

Issue 2301073002: Optimization: avoid making 4 JNI calls to get touch device attributes. (Closed)
Patch Set: Fix windows compile issues 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
« no previous file with comments | « ui/base/touch/touch_device.h ('k') | ui/base/touch/touch_device_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f29070abbc5daef40c03be59c32c33f82129dc75 100644
--- a/ui/base/touch/touch_device.cc
+++ b/ui/base/touch/touch_device.cc
@@ -16,22 +16,17 @@ int MaxTouchPoints() {
return 0;
}
-int GetAvailablePointerTypes() {
+std::pair<int, int> GetAvailablePointerAndHoverTypes() {
// Assume a non-touch-device with a mouse
- return POINTER_TYPE_FINE;
+ return std::make_pair(POINTER_TYPE_FINE, HOVER_TYPE_HOVER);
}
-PointerType GetPrimaryPointerType() {
+PointerType GetPrimaryPointerType(int available_pointer_types) {
// Assume a non-touch-device with a mouse
return POINTER_TYPE_FINE;
}
-int GetAvailableHoverTypes() {
- // Assume a non-touch-device with a mouse
- return HOVER_TYPE_HOVER;
-}
-
-HoverType GetPrimaryHoverType() {
+HoverType GetPrimaryHoverType(int available_hover_types) {
// Assume a non-touch-device with a mouse
return HOVER_TYPE_HOVER;
}
« no previous file with comments | « ui/base/touch/touch_device.h ('k') | ui/base/touch/touch_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698