| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/public/cpp/shell_window_ids.h" | 8 #include "ash/public/cpp/shell_window_ids.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 void MaximizeModeWindowManager::OnOverviewModeStarting() { | 81 void MaximizeModeWindowManager::OnOverviewModeStarting() { |
| 82 SetDeferBoundsUpdates(true); | 82 SetDeferBoundsUpdates(true); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void MaximizeModeWindowManager::OnOverviewModeEnded() { | 85 void MaximizeModeWindowManager::OnOverviewModeEnded() { |
| 86 SetDeferBoundsUpdates(false); | 86 SetDeferBoundsUpdates(false); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void MaximizeModeWindowManager::OnSplitViewModeEnded() { |
| 90 // Maximize All windows upon exit split view mode. |
| 91 for (auto& pair : window_state_map_) { |
| 92 wm::WMEvent event(wm::WM_EVENT_MAXIMIZE); |
| 93 wm::GetWindowState(pair.first)->OnWMEvent(&event); |
| 94 } |
| 95 } |
| 96 |
| 89 void MaximizeModeWindowManager::OnWindowDestroying(aura::Window* window) { | 97 void MaximizeModeWindowManager::OnWindowDestroying(aura::Window* window) { |
| 90 if (IsContainerWindow(window)) { | 98 if (IsContainerWindow(window)) { |
| 91 // container window can be removed on display destruction. | 99 // container window can be removed on display destruction. |
| 92 window->RemoveObserver(this); | 100 window->RemoveObserver(this); |
| 93 observed_container_windows_.erase(window); | 101 observed_container_windows_.erase(window); |
| 94 } else if (base::ContainsValue(added_windows_, window)) { | 102 } else if (base::ContainsValue(added_windows_, window)) { |
| 95 // Added window was destroyed before being shown. | 103 // Added window was destroyed before being shown. |
| 96 added_windows_.erase(window); | 104 added_windows_.erase(window); |
| 97 window->RemoveObserver(this); | 105 window->RemoveObserver(this); |
| 98 } else { | 106 } else { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // Inform the WorkspaceLayoutManager that we want to show a backdrop behind | 307 // Inform the WorkspaceLayoutManager that we want to show a backdrop behind |
| 300 // the topmost window of its container. | 308 // the topmost window of its container. |
| 301 for (auto* controller : Shell::GetAllRootWindowControllers()) { | 309 for (auto* controller : Shell::GetAllRootWindowControllers()) { |
| 302 controller->workspace_controller()->SetBackdropDelegate( | 310 controller->workspace_controller()->SetBackdropDelegate( |
| 303 enable ? base::MakeUnique<MaximizeModeBackdropDelegateImpl>() | 311 enable ? base::MakeUnique<MaximizeModeBackdropDelegateImpl>() |
| 304 : nullptr); | 312 : nullptr); |
| 305 } | 313 } |
| 306 } | 314 } |
| 307 | 315 |
| 308 } // namespace ash | 316 } // namespace ash |
| OLD | NEW |