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

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

Issue 696713002: Pointer/hover media query support: platform-dependent changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incremental, android-only changes Created 6 years, 2 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.h
diff --git a/ui/base/touch/touch_device.h b/ui/base/touch/touch_device.h
index fd75ebcc9c6714e66ae918ab7a276e299d6b9bb9..3ff065a619febafe5a5388b44843a6da09243829 100644
--- a/ui/base/touch/touch_device.h
+++ b/ui/base/touch/touch_device.h
@@ -26,6 +26,28 @@ UI_BASE_EXPORT bool IsTouchDevicePresent();
// http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints
UI_BASE_EXPORT int MaxTouchPoints();
+// Bit field values indicating what kind of pointer types are available. These
+// enum must match content::PointerType enums.
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.ui.base
+enum PointerType {
+ PointerTypeNone = 1,
jdduke (slow) 2014/10/31 15:51:44 Why start with 1 for None? Also, the typical way o
mustaq 2014/10/31 16:58:20 Short answer: I followed the blink-side (WebSettin
bokan 2014/11/03 14:28:11 Actually, this isn't to do with an "unknown" value
mustaq 2014/11/03 17:11:38 Thanks for the clarification. Will keep the 1-base
+ PointerTypeCoarse = 2,
+ PointerTypeFine = 4
+};
+
+// Bit field values indicating what kind of pointer types are available. These
+// enums must match content::HoverType enums.
+enum HoverType {
+ HoverTypeNone = 1,
jdduke (slow) 2014/10/31 15:51:44 Why can't we just use the ui::PointerType/ui::Hove
mustaq 2014/10/31 16:58:20 Hmm, didn't think this way. I instead considered u
+ HoverTypeOnDemand = 2,
+ HoverTypeHover = 4
+};
+
+UI_BASE_EXPORT int AvailablePointerTypes();
+UI_BASE_EXPORT PointerType PrimaryPointerType();
+UI_BASE_EXPORT int AvailableHoverTypes();
+UI_BASE_EXPORT HoverType PrimaryHoverType();
+
#if defined(OS_ANDROID)
bool RegisterTouchDeviceAndroid(JNIEnv* env);
#endif

Powered by Google App Engine
This is Rietveld 408576698