| 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/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/keyboard/keyboard_observer_register.h" | 9 #include "ash/keyboard/keyboard_observer_register.h" |
| 10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 void WorkspaceLayoutManager::UpdateAlwaysOnTop(aura::Window* window_on_top) { | 395 void WorkspaceLayoutManager::UpdateAlwaysOnTop(aura::Window* window_on_top) { |
| 396 // Changing always on top state may change window's parent. Iterate on a copy | 396 // Changing always on top state may change window's parent. Iterate on a copy |
| 397 // of |windows_| to avoid invalidating an iterator. Since both workspace and | 397 // of |windows_| to avoid invalidating an iterator. Since both workspace and |
| 398 // always_on_top containers' layouts are managed by this class all the | 398 // always_on_top containers' layouts are managed by this class all the |
| 399 // appropriate windows will be included in the iteration. | 399 // appropriate windows will be included in the iteration. |
| 400 WindowSet windows(windows_); | 400 WindowSet windows(windows_); |
| 401 for (aura::Window* window : windows) { | 401 for (aura::Window* window : windows) { |
| 402 wm::WindowState* window_state = wm::GetWindowState(window); | 402 wm::WindowState* window_state = wm::GetWindowState(window); |
| 403 if (window_on_top) | 403 if (window_on_top) |
| 404 window_state->DisableAlwaysOnTop(WmWindow::Get(window_on_top)); | 404 window_state->DisableAlwaysOnTop(window_on_top); |
| 405 else | 405 else |
| 406 window_state->RestoreAlwaysOnTop(); | 406 window_state->RestoreAlwaysOnTop(); |
| 407 } | 407 } |
| 408 } | 408 } |
| 409 | 409 |
| 410 } // namespace ash | 410 } // namespace ash |
| OLD | NEW |