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

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 437213005: Fixing problem with the maximize mode where MultiProfile windows do not get properly handled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 years, 4 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/wm/maximize_mode/maximize_mode_window_manager.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager.cc b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
index e434cba55eccc77f06440168807c7ec7ce0b669b..2e9f042970907350d2ae11748c3eb9a8215660df 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager.cc
@@ -54,6 +54,18 @@ int MaximizeModeWindowManager::GetNumberOfManagedWindows() {
return window_state_map_.size();
}
+void MaximizeModeWindowManager::AddWindow(aura::Window* window) {
+ // Only add the window if it is a direct dependent of a container window
+ // and not yet tracked.
+ if (!ShouldHandleWindow(window) ||
+ window_state_map_.find(window) != window_state_map_.end() ||
+ !IsContainerWindow(window->parent())) {
+ return;
+ }
+
+ MaximizeAndTrackWindow(window);
+}
+
void MaximizeModeWindowManager::WindowStateDestroyed(aura::Window* window) {
// At this time ForgetWindow() should already have been called. If not,
// someone else must have replaced the "window manager's state object".

Powered by Google App Engine
This is Rietveld 408576698