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

Unified Diff: ash/display/screen_ash.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 | « ash/display/display_manager_unittest.cc ('k') | ui/display/display.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/screen_ash.cc
diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc
index e1a7a9ea44012ef7b0fc5216961fdec499f24ca7..e70460f61a9954ddcc9a19598506a43cb76d19f6 100644
--- a/ash/display/screen_ash.cc
+++ b/ash/display/screen_ash.cc
@@ -4,12 +4,14 @@
#include "ash/display/screen_ash.h"
+#include "ash/ash_switches.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/root_window_controller.h"
#include "ash/root_window_settings.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/wm/root_window_finder.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/env.h"
@@ -184,7 +186,13 @@ display::DisplayManager* ScreenAsh::CreateDisplayManager() {
// use ash's screen.
if (!current || current == screen_for_shutdown)
display::Screen::SetScreenInstance(screen.get());
- return new display::DisplayManager(std::move(screen));
+ display::DisplayManager* manager =
+ new display::DisplayManager(std::move(screen));
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableTouchView)) {
+ manager->set_internal_display_has_accelerometer(true);
+ }
+ return manager;
}
// static
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | ui/display/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698