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

Unified Diff: ash/root_window_controller.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/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 5a798d7d85c01ff97130c3d73c5457c7b4919147..ab81ea614903761f0d9e9d69a2c7b76674169c47 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -306,7 +306,7 @@ class CrosAccessibilityObserver : public AccessibilityObserver {
DISALLOW_COPY_AND_ASSIGN(CrosAccessibilityObserver);
};
-#endif // OS_CHROMEOS
+#endif // OS_CHROMEOS
jonross 2014/05/29 15:24:42 cpplint
} // namespace
@@ -526,6 +526,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());
@@ -537,8 +542,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;
}

Powered by Google App Engine
This is Rietveld 408576698