OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/workspace/workspace_layout_manager.h" | 5 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
10 #include "ash/common/wm/always_on_top_controller.h" | 10 #include "ash/common/wm/always_on_top_controller.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 is_fullscreen_ = is_fullscreen; | 351 is_fullscreen_ = is_fullscreen; |
352 } | 352 } |
353 } | 353 } |
354 | 354 |
355 void WorkspaceLayoutManager::UpdateAlwaysOnTop(WmWindow* window_on_top) { | 355 void WorkspaceLayoutManager::UpdateAlwaysOnTop(WmWindow* window_on_top) { |
356 // Changing always on top state may change window's parent. Iterate on a copy | 356 // Changing always on top state may change window's parent. Iterate on a copy |
357 // of |windows_| to avoid invalidating an iterator. Since both workspace and | 357 // of |windows_| to avoid invalidating an iterator. Since both workspace and |
358 // always_on_top containers' layouts are managed by this class all the | 358 // always_on_top containers' layouts are managed by this class all the |
359 // appropriate windows will be included in the iteration. | 359 // appropriate windows will be included in the iteration. |
360 WindowSet windows(windows_); | 360 WindowSet windows(windows_); |
361 for (auto window : windows) { | 361 for (auto* window : windows) { |
362 wm::WindowState* window_state = window->GetWindowState(); | 362 wm::WindowState* window_state = window->GetWindowState(); |
363 if (window_on_top) | 363 if (window_on_top) |
364 window_state->DisableAlwaysOnTop(window_on_top); | 364 window_state->DisableAlwaysOnTop(window_on_top); |
365 else | 365 else |
366 window_state->RestoreAlwaysOnTop(); | 366 window_state->RestoreAlwaysOnTop(); |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 } // namespace ash | 370 } // namespace ash |
OLD | NEW |