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

Unified Diff: ui/display/manager/display_manager.cc

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 | « ui/display/manager/display_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/manager/display_manager.cc
diff --git a/ui/display/manager/display_manager.cc b/ui/display/manager/display_manager.cc
index 05825cacfd1db31d8e445ca7bf12abf56a68109b..7390e32a23fdba474501a8f99a382691fb5be0e9 100644
--- a/ui/display/manager/display_manager.cc
+++ b/ui/display/manager/display_manager.cc
@@ -1391,6 +1391,14 @@ Display DisplayManager::CreateDisplayFromDisplayInfoById(int64_t id) {
new_display.set_rotation(display_info.GetActiveRotation());
new_display.set_touch_support(display_info.touch_support());
new_display.set_maximum_cursor_size(display_info.maximum_cursor_size());
+
+ if (internal_display_has_accelerometer_ && Display::IsInternalDisplayId(id)) {
+ new_display.set_accelerometer_support(
+ Display::ACCELEROMETER_SUPPORT_AVAILABLE);
+ } else {
+ new_display.set_accelerometer_support(
+ Display::ACCELEROMETER_SUPPORT_UNAVAILABLE);
+ }
return new_display;
}
« no previous file with comments | « ui/display/manager/display_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698