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

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

Issue 197883011: Enable maximize mode when keyboard is open past 180 degrees. (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 | « 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
new file mode 100644
index 0000000000000000000000000000000000000000..f9919fa08d2af4a89446f0bf63600ad459d666b4
--- /dev/null
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
+#define ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
+
+#include "ash/accelerometer/accelerometer_observer.h"
+#include "base/macros.h"
+
+namespace ash {
+
+// MaximizeModeController listens to accelerometer events and automatically
+// enters and exits maximize mode when the lid is opened beyond the triggering
+// angle.
+class MaximizeModeController : public AccelerometerObserver {
+ public:
+ MaximizeModeController();
+ virtual ~MaximizeModeController();
+
+ virtual void OnAccelerometerUpdated(const gfx::Vector3dF& base,
+ const gfx::Vector3dF& lid) OVERRIDE;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
+};
+
+} // namespace ash
+
+#endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_
« 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