summaryrefslogtreecommitdiffstats
path: root/ash/root_window_controller.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/root_window_controller.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/root_window_controller.cc')
-rw-r--r--ash/root_window_controller.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 5763b3d..d04a0f2 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -307,7 +307,7 @@ class CrosAccessibilityObserver : public AccessibilityObserver {
DISALLOW_COPY_AND_ASSIGN(CrosAccessibilityObserver);
};
-#endif // OS_CHROMEOS
+#endif // OS_CHROMEOS
} // namespace
@@ -527,6 +527,11 @@ void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) {
void RootWindowController::CloseChildWindows() {
mouse_event_target_.reset();
+ // Remove observer as deactivating keyboard causes |docked_layout_manager_|
+ // to fire notifications.
+ if (docked_layout_manager_ && shelf_ && shelf_->shelf_layout_manager())
+ docked_layout_manager_->RemoveObserver(shelf_->shelf_layout_manager());
+
// Deactivate keyboard container before closing child windows and shutting
// down associated layout managers.
DeactivateKeyboard(keyboard::KeyboardController::GetInstance());
@@ -538,8 +543,6 @@ void RootWindowController::CloseChildWindows() {
}
// docked_layout_manager_ needs to be shut down before windows are destroyed.
if (docked_layout_manager_) {
- if (shelf_ && shelf_->shelf_layout_manager())
- docked_layout_manager_->RemoveObserver(shelf_->shelf_layout_manager());
docked_layout_manager_->Shutdown();
docked_layout_manager_ = NULL;
}