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

Unified Diff: ui/display/display.h

Issue 2950083002: Add accelerometer support property to Display. (Closed)
Patch Set: fixed to bool Created 3 years, 6 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 | « ash/display/screen_ash.cc ('k') | ui/display/manager/display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display.h
diff --git a/ui/display/display.h b/ui/display/display.h
index acb45354dc7c8eefc47485142a7c3616c3ada96a..2f30a59ec4068a7ebd82547d7c233ceb8bf2dae4 100644
--- a/ui/display/display.h
+++ b/ui/display/display.h
@@ -66,6 +66,13 @@ class DISPLAY_EXPORT Display final {
TOUCH_SUPPORT_UNAVAILABLE,
};
+ // Accelerometer support for the display.
+ enum AccelerometerSupport {
+ ACCELEROMETER_SUPPORT_UNKNOWN,
+ ACCELEROMETER_SUPPORT_AVAILABLE,
+ ACCELEROMETER_SUPPORT_UNAVAILABLE,
+ };
+
// Creates a display with kInvalidDisplayId as default.
Display();
explicit Display(int64_t id);
@@ -117,6 +124,13 @@ class DISPLAY_EXPORT Display final {
TouchSupport touch_support() const { return touch_support_; }
void set_touch_support(TouchSupport support) { touch_support_ = support; }
+ AccelerometerSupport accelerometer_support() const {
+ return accelerometer_support_;
+ }
+ void set_accelerometer_support(AccelerometerSupport support) {
+ accelerometer_support_ = support;
+ }
+
// Utility functions that just return the size of display and
// work area.
const gfx::Size& size() const { return bounds_.size(); }
@@ -208,6 +222,7 @@ class DISPLAY_EXPORT Display final {
float device_scale_factor_;
Rotation rotation_ = ROTATE_0;
TouchSupport touch_support_ = TOUCH_SUPPORT_UNKNOWN;
+ AccelerometerSupport accelerometer_support_ = ACCELEROMETER_SUPPORT_UNKNOWN;
gfx::Size maximum_cursor_size_;
// NOTE: this is not currently written to the mojom as it is not used in
// aura.
« no previous file with comments | « ash/display/screen_ash.cc ('k') | ui/display/manager/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698