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

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

Issue 289583002: Lock rotation when screen is manually rotated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non chromeOS builds 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 | « ash/shell.cc ('k') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_controller.h
diff --git a/ash/wm/maximize_mode/maximize_mode_controller.h b/ash/wm/maximize_mode/maximize_mode_controller.h
index 4d19dcc8e80d4d149ced7b9aef9ef21d7bc375bd..fd2efe5acb13e105eb3e53964619082c9c17cac3 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -10,6 +10,7 @@
#include "ash/display/display_manager.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/display.h"
namespace ui {
class EventHandler;
@@ -69,6 +70,14 @@ class ASH_EXPORT MaximizeModeController : public AccelerometerObserver {
void SetDisplayRotation(DisplayManager* display_manager,
gfx::Display::Rotation rotation);
+ // Enables MaximizeModeWindowManager, and determines the current state of
+ // rotation lock.
+ void EnterMaximizeMode();
+
+ // Removes MaximizeModeWindowManager and resets the display rotation if there
+ // is no rotation lock.
+ void LeaveMaximizeMode();
+
// An event targeter controller which traps mouse and keyboard events while
// maximize mode is engaged.
scoped_ptr<MaximizeModeEventBlocker> event_blocker_;
@@ -85,6 +94,10 @@ class ASH_EXPORT MaximizeModeController : public AccelerometerObserver {
// True when the screen's orientation is being changed.
bool in_set_screen_rotation_;
+ // The rotation of the display set by the user. This rotation will be
+ // restored upon exiting maximize mode.
+ gfx::Display::Rotation user_rotation_;
+
DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
};
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698