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

Unified Diff: ash/wm/maximize_mode/maximize_mode_controller.cc

Issue 648733003: Implement ScreenOrientationDelegate on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Generalize rotation locking 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
Index: ash/wm/maximize_mode/maximize_mode_controller.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_controller.cc b/ash/wm/maximize_mode/maximize_mode_controller.cc
index dc78d281d2cb69534b0c687557cf5db7367ef887..cd50dc2e108372419ea832d96f77c90a8e3bc4ef 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller.cc
@@ -152,6 +152,11 @@ void MaximizeModeController::SetRotationLocked(bool rotation_locked) {
OnRotationLockChanged(rotation_locked_));
}
+void MaximizeModeController::LockRotation(gfx::Display::Rotation rotation) {
+ SetRotationLocked(true);
+ SetDisplayRotation(Shell::GetInstance()->display_manager(), rotation);
+}
+
void MaximizeModeController::AddObserver(Observer* observer) {
observers_.AddObserver(observer);
}

Powered by Google App Engine
This is Rietveld 408576698