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