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

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

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback Created 3 years, 8 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 if (root_window_controller_->HasShelf()) 367 if (root_window_controller_->HasShelf())
368 root_window_controller_->GetShelf()->UpdateVisibilityState(); 368 root_window_controller_->GetShelf()->UpdateVisibilityState();
369 } 369 }
370 370
371 void WorkspaceLayoutManager::UpdateFullscreenState() { 371 void WorkspaceLayoutManager::UpdateFullscreenState() {
372 // TODO(flackr): The fullscreen state is currently tracked per workspace 372 // TODO(flackr): The fullscreen state is currently tracked per workspace
373 // but the shell notification implies a per root window state. Currently 373 // but the shell notification implies a per root window state. Currently
374 // only windows in the default workspace container will go fullscreen but 374 // only windows in the default workspace container will go fullscreen but
375 // this should really be tracked by the RootWindowController since 375 // this should really be tracked by the RootWindowController since
376 // technically any container could get a fullscreen window. 376 // technically any container could get a fullscreen window.
377 if (window_->GetShellWindowId() != kShellWindowId_DefaultContainer) 377 if (window_->aura_window()->id() != kShellWindowId_DefaultContainer)
378 return; 378 return;
379 bool is_fullscreen = wm::GetWindowForFullscreenMode(window_) != nullptr; 379 bool is_fullscreen = wm::GetWindowForFullscreenMode(window_) != nullptr;
380 if (is_fullscreen != is_fullscreen_) { 380 if (is_fullscreen != is_fullscreen_) {
381 Shell::Get()->NotifyFullscreenStateChanged(is_fullscreen, root_window_); 381 Shell::Get()->NotifyFullscreenStateChanged(is_fullscreen, root_window_);
382 is_fullscreen_ = is_fullscreen; 382 is_fullscreen_ = is_fullscreen;
383 } 383 }
384 } 384 }
385 385
386 void WorkspaceLayoutManager::UpdateAlwaysOnTop(WmWindow* window_on_top) { 386 void WorkspaceLayoutManager::UpdateAlwaysOnTop(WmWindow* window_on_top) {
387 // Changing always on top state may change window's parent. Iterate on a copy 387 // Changing always on top state may change window's parent. Iterate on a copy
388 // of |windows_| to avoid invalidating an iterator. Since both workspace and 388 // of |windows_| to avoid invalidating an iterator. Since both workspace and
389 // always_on_top containers' layouts are managed by this class all the 389 // always_on_top containers' layouts are managed by this class all the
390 // appropriate windows will be included in the iteration. 390 // appropriate windows will be included in the iteration.
391 WindowSet windows(windows_); 391 WindowSet windows(windows_);
392 for (auto* window : windows) { 392 for (auto* window : windows) {
393 wm::WindowState* window_state = window->GetWindowState(); 393 wm::WindowState* window_state = window->GetWindowState();
394 if (window_on_top) 394 if (window_on_top)
395 window_state->DisableAlwaysOnTop(window_on_top); 395 window_state->DisableAlwaysOnTop(window_on_top);
396 else 396 else
397 window_state->RestoreAlwaysOnTop(); 397 window_state->RestoreAlwaysOnTop();
398 } 398 }
399 } 399 }
400 400
401 } // namespace ash 401 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/phantom_window_controller.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698