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

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: 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/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index b8a69de6cc396d169978dac6e2a6a0f79cb2fb62..b97c730d0d5fe1e40ffa28138a42cef2c008454c 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -465,21 +465,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());
}
@@ -689,10 +677,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();
Mr4D (OOO till 08-26) 2014/05/29 22:15:24 Combining the two is not possible? (calling shutdo
jonross 2014/05/30 14:37:50 Not right now. Currently everything listening to
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

Powered by Google App Engine
This is Rietveld 408576698