| 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/common/wm/maximize_mode/maximize_mode_window_manager.h" | 5 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" | 9 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" |
| 10 #include "ash/common/wm/maximize_mode/maximize_mode_window_state.h" | 10 #include "ash/common/wm/maximize_mode/maximize_mode_window_state.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 258 } |
| 259 | 259 |
| 260 bool MaximizeModeWindowManager::ShouldHandleWindow(WmWindow* window) { | 260 bool MaximizeModeWindowManager::ShouldHandleWindow(WmWindow* window) { |
| 261 DCHECK(window); | 261 DCHECK(window); |
| 262 | 262 |
| 263 // Windows with the always-on-top property should be free-floating and thus | 263 // Windows with the always-on-top property should be free-floating and thus |
| 264 // not managed by us. | 264 // not managed by us. |
| 265 if (window->IsAlwaysOnTop()) | 265 if (window->IsAlwaysOnTop()) |
| 266 return false; | 266 return false; |
| 267 | 267 |
| 268 // Windows in the dock should not be managed by us. | |
| 269 if (window->GetWindowState()->IsDocked()) | |
| 270 return false; | |
| 271 | |
| 272 // If the changing bounds in the maximized/fullscreen is allowed, then | 268 // If the changing bounds in the maximized/fullscreen is allowed, then |
| 273 // let the client manage it even in maximized mode. | 269 // let the client manage it even in maximized mode. |
| 274 if (window->GetWindowState()->allow_set_bounds_in_maximized()) | 270 if (window->GetWindowState()->allow_set_bounds_in_maximized()) |
| 275 return false; | 271 return false; |
| 276 | 272 |
| 277 return window->GetType() == ui::wm::WINDOW_TYPE_NORMAL; | 273 return window->GetType() == ui::wm::WINDOW_TYPE_NORMAL; |
| 278 } | 274 } |
| 279 | 275 |
| 280 void MaximizeModeWindowManager::AddWindowCreationObservers() { | 276 void MaximizeModeWindowManager::AddWindowCreationObservers() { |
| 281 DCHECK(observed_container_windows_.empty()); | 277 DCHECK(observed_container_windows_.empty()); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 RootWindowController* controller = root->GetRootWindowController(); | 320 RootWindowController* controller = root->GetRootWindowController(); |
| 325 WmWindow* default_container = | 321 WmWindow* default_container = |
| 326 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer); | 322 root->GetChildByShellWindowId(kShellWindowId_DefaultContainer); |
| 327 controller->workspace_controller()->SetMaximizeBackdropDelegate( | 323 controller->workspace_controller()->SetMaximizeBackdropDelegate( |
| 328 enable ? base::MakeUnique<WorkspaceBackdropDelegate>(default_container) | 324 enable ? base::MakeUnique<WorkspaceBackdropDelegate>(default_container) |
| 329 : nullptr); | 325 : nullptr); |
| 330 } | 326 } |
| 331 } | 327 } |
| 332 | 328 |
| 333 } // namespace ash | 329 } // namespace ash |
| OLD | NEW |