Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Side by Side Diff: ash/wm/workspace/workspace_layout_manager.cc

Issue 2901663003: chromeos: converts WindowState to aura::Window (Closed)
Patch Set: feedback Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698