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

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: Rebase Created 6 years, 6 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/test/shell_test_api.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 fd2efe5acb13e105eb3e53964619082c9c17cac3..4ee4a38e78ee51c55273edf8a806f0848a1da97c 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,30 @@ 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
+ // 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;
+
+ // TODO(jonross): move this into the destructor. Currently separated as
+ // ShellOberver notifies of maximize mode ending, and the observers end up
+ // attempting to access MaximizeModeController via the Shell. If done in
+ // destructor the controller is null, and the observers segfault.
+ // Shuts down down the MaximizeModeWindowManager and notifies all observers.
+ 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 +98,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_;
« no previous file with comments | « ash/test/shell_test_api.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