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

Unified Diff: content/public/common/web_preferences.h

Issue 685153003: Pointer/hover media query support: platform-independent changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed platform-dependent changes, and rebased 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
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | content/public/common/web_preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/web_preferences.h
diff --git a/content/public/common/web_preferences.h b/content/public/common/web_preferences.h
index d7e65f772ca43a9a72aeecb6f471a5df29b2d6dd..b777fea8b249ecbe2dc71626d8f874e2c1b04453 100644
--- a/content/public/common/web_preferences.h
+++ b/content/public/common/web_preferences.h
@@ -39,6 +39,28 @@ enum V8CacheOptions {
V8_CACHE_OPTIONS_LAST = V8_CACHE_OPTIONS_CODE
};
+// Bit field values indicating what kind of pointer types are available. These
+// enum must match blink::WebSettings::PointerType enums.
+enum PointerType {
+ POINTER_TYPE_NONE = 1,
jdduke (slow) 2014/11/11 01:17:54 So just to be clear, are we saying there's no bene
mustaq 2014/11/11 15:41:41 Done removing the types from here.
+ POINTER_TYPE_FIRST = POINTER_TYPE_NONE,
+ POINTER_TYPE_COARSE = 2,
+ POINTER_TYPE_FINE = 4,
+ POINTER_TYPE_LAST = POINTER_TYPE_FINE
+};
+
+// Bit field values indicating what kind of pointer types are available. These
+// enums must match blink::WebSettings::HoverType enums.
+enum HoverType {
+ HOVER_TYPE_NONE = 1,
+ HOVER_TYPE_FIRST = HOVER_TYPE_NONE,
+ // Indicates that the primary pointing system can hover, but it requires a
+ // significant action on the user’s part. e.g. hover on “long press”.
+ HOVER_TYPE_ON_DEMAND = 2,
+ HOVER_TYPE_HOVER = 4,
+ HOVER_TYPE_LAST = HOVER_TYPE_HOVER
+};
+
// The ISO 15924 script code for undetermined script aka Common. It's the
// default used on WebKit's side to get/set a font setting when no script is
// specified.
@@ -123,10 +145,16 @@ struct CONTENT_EXPORT WebPreferences {
bool css_variables_enabled;
bool region_based_columns_enabled;
bool touch_enabled;
+ // TODO(mustaq): Nuke when the new API is ready
bool device_supports_touch;
+ // TODO(mustaq): Nuke when the new API is ready
bool device_supports_mouse;
bool touch_adjustment_enabled;
int pointer_events_max_touch_points;
+ int available_pointer_types;
+ PointerType primary_pointer_type;
+ int available_hover_types;
+ HoverType primary_hover_type;
bool sync_xhr_in_documents_enabled;
bool deferred_image_decoding_enabled;
bool should_respect_image_orientation;
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | content/public/common/web_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698