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

Unified Diff: ash/shell.cc

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/shell.h ('k') | ash/system/chromeos/brightness/tray_brightness.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index c8d5da4888a006caf6dad660bcffd02a7cb3672a..3d83a68d22d9db3cb914c5b0eb5734402bb9b150 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
« no previous file with comments | « ash/shell.h ('k') | ash/system/chromeos/brightness/tray_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698