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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 289583002: Lock rotation when screen is manually rotated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define sources for rotation Created 6 years, 7 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 | « no previous file | ash/display/display_controller_unittest.cc » ('j') | ash/display/display_info.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 96ee265d23b84e862c260c41ea42eceaa55c1b82..0dc9bd169bb98aab2b1c421217600170199b6ac5 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -63,6 +63,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/compositor/layer_animator.h"
+#include "ui/display/types/display_constants.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/screen.h"
@@ -345,7 +346,8 @@ bool HandleRotateScreen() {
const DisplayInfo& display_info =
Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id());
Shell::GetInstance()->display_manager()->SetDisplayRotation(
- display.id(), GetNextRotation(display_info.rotation()));
+ display.id(), GetNextRotation(display_info.rotation()),
+ ui::USER);
return true;
}
« no previous file with comments | « no previous file | ash/display/display_controller_unittest.cc » ('j') | ash/display/display_info.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698