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

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

Issue 308683002: Move MaximizeModeWindowManager to the controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 fd2efe5acb13e105eb3e53964619082c9c17cac3..2ddec757ca79f11db8bea624b2ba7d9194fe28e6 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -20,6 +20,8 @@ namespace ash {
class MaximizeModeControllerTest;
class MaximizeModeEventBlocker;
+class MaximizeModeWindowManager;
+class MaximizeModeWindowManagerTest;
// MaximizeModeController listens to accelerometer events and automatically
// enters and exits maximize mode when the lid is opened beyond the triggering
@@ -50,12 +52,26 @@ class ASH_EXPORT MaximizeModeController : public AccelerometerObserver {
// maximize mode becomes enabled.
bool CanEnterMaximizeMode();
+ // TODO(jonross): Merge this with EnterMaximizeMode. Currently these are
+ // separate for several reasons: there is no internal display when running
oshima 2014/05/29 22:44:45 You can enable internal display for test using gf
jonross 2014/05/30 14:37:50 We found then also want to add that to where accel
+ // unittests; the event blocker prevents keyboard input when running ChromeOS
+ // on linux. http://crbug.com/362881
+ // Turn the always maximize mode window manager on or off.
+ void EnableMaximizeModeWindowManager(bool enable);
+
+ // Test if the MaximizeModeWindowManager is enabled or not.
+ bool IsMaximizeModeWindowManagerEnabled() const;
+
+ // Shutdowns down the MaximizeModeWindowManager and notifies all observers.
Mr4D (OOO till 08-26) 2014/05/29 22:15:24 Could you add a note here towards why you do not c
jonross 2014/05/30 14:37:50 Done. I'll upload on the next patch, once we deci
+ void Shutdown();
+
// AccelerometerObserver:
virtual void OnAccelerometerUpdated(const gfx::Vector3dF& base,
const gfx::Vector3dF& lid) OVERRIDE;
private:
friend class MaximizeModeControllerTest;
+ friend class MaximizeModeWindowManagerTest;
// Detect hinge rotation from |base| and |lid| accelerometers and
// automatically start / stop maximize mode.
@@ -78,6 +94,9 @@ class ASH_EXPORT MaximizeModeController : public AccelerometerObserver {
// is no rotation lock.
void LeaveMaximizeMode();
+ // The maximized window manager (if enabled).
+ scoped_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_;
+
// An event targeter controller which traps mouse and keyboard events while
// maximize mode is engaged.
scoped_ptr<MaximizeModeEventBlocker> event_blocker_;

Powered by Google App Engine
This is Rietveld 408576698