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

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

Issue 196413017: Auto rotate on lid rotation changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 6 years, 9 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/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 f9919fa08d2af4a89446f0bf63600ad459d666b4..0ef1b9f6e7e668b92de0e4318e1742458188c760 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -12,7 +12,7 @@ namespace ash {
// MaximizeModeController listens to accelerometer events and automatically
// enters and exits maximize mode when the lid is opened beyond the triggering
-// angle.
+// angle and rotates the display to match the device when in maximize mode.
class MaximizeModeController : public AccelerometerObserver {
public:
MaximizeModeController();
@@ -21,6 +21,15 @@ class MaximizeModeController : public AccelerometerObserver {
virtual void OnAccelerometerUpdated(const gfx::Vector3dF& base,
const gfx::Vector3dF& lid) OVERRIDE;
private:
+ // Detect hinge rotation from |base| and |lid| accelerometers and
+ // automatically start / stop maximize mode.
+ void HandleHingeRotation(const gfx::Vector3dF& base,
+ const gfx::Vector3dF& lid);
+
+ // Detect screen rotation from |lid| accelerometer and automatically rotate
+ // screen.
+ void HandleScreenRotation(const gfx::Vector3dF& lid);
+
DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
};
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698