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

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: Add tests, constants, and stickiness to entering / exiting. 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
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..733a285a9cccd44ac07bf0b0de06001f7a186e24
--- /dev/null
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -0,0 +1,31 @@
+// 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 {
+namespace internal {
oshima 2014/04/01 22:29:08 let's kill "internal" namespace. I talked to sever
flackr 2014/04/02 21:24:30 Done.
+
+// 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 internal
+} // namespace ash
+
+#endif // ASH_WM_MAXIMIZE_MODE_MAXIMIZE_MODE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698