summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authorjonross@chromium.org <jonross@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-09 20:02:26 +0000
committerjonross@chromium.org <jonross@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-09 20:02:26 +0000
commit2a57beb531db01d470431e842dc02645e7ab760e (patch)
treeae00ace44801238edbdbdd2d18e7004366dc03cd /ash/shell.cc
parentb16565566a248a52352a5793743779d7ae89f5a1 (diff)
downloadchromium_src-2a57beb531db01d470431e842dc02645e7ab760e.zip
chromium_src-2a57beb531db01d470431e842dc02645e7ab760e.tar.gz
chromium_src-2a57beb531db01d470431e842dc02645e7ab760e.tar.bz2
Move MaximizeModeWindowManager to the controller
Remove MaximizeModeWindowManager from Shell. Place it within MaximizeModeController. Move notifications to ShellObserver to after the creation of the window manager. This way checks for it being enabled are correct during notifications. Update all files that were working around this deficiency. TEST=MaximizeModeController Review URL: https://codereview.chromium.org/308683002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc18
1 files changed, 3 insertions, 15 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index c8d5da4..3d83a68 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -467,21 +467,9 @@ void Shell::RemoveShellObserver(ShellObserver* observer) {
observers_.RemoveObserver(observer);
}
-void Shell::EnableMaximizeModeWindowManager(bool enable) {
- if (enable && !maximize_mode_window_manager_.get()) {
- maximize_mode_window_manager_.reset(new MaximizeModeWindowManager());
- } else if (!enable && maximize_mode_window_manager_.get()) {
- maximize_mode_window_manager_.reset();
- }
-}
-
-bool Shell::IsMaximizeModeWindowManagerEnabled() {
- return maximize_mode_window_manager_.get() != NULL;
-}
-
#if defined(OS_CHROMEOS)
bool Shell::ShouldSaveDisplaySettings() {
- return !((IsMaximizeModeWindowManagerEnabled() &&
+ return !((maximize_mode_controller_->IsMaximizeModeWindowManagerEnabled() &&
maximize_mode_controller_->in_set_screen_rotation()) ||
resolution_notification_controller_->DoesNotificationTimeout());
}
@@ -691,10 +679,10 @@ Shell::~Shell() {
// TooltipController is deleted with the Shell so removing its references.
RemovePreTargetHandler(tooltip_controller_.get());
- // Destroy maximize window manager early on since it has some observers which
+ // Destroy maximize mode controller early on since it has some observers which
// need to be removed.
+ maximize_mode_controller_->Shutdown();
maximize_mode_controller_.reset();
- maximize_mode_window_manager_.reset();
// AppList needs to be released before shelf layout manager, which is
// destroyed with shelf container in the loop below. However, app list