| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 // If a user plugs an external display into a laptop running Aura the | 367 // If a user plugs an external display into a laptop running Aura the |
| 368 // display size will change. Maximized windows need to resize to match. | 368 // display size will change. Maximized windows need to resize to match. |
| 369 // We also do this when developers running Aura on a desktop manually resize | 369 // We also do this when developers running Aura on a desktop manually resize |
| 370 // the host window. | 370 // the host window. |
| 371 // We also need to do this when the work area insets changes. | 371 // We also need to do this when the work area insets changes. |
| 372 for (aura::Window* window : windows_) | 372 for (aura::Window* window : windows_) |
| 373 wm::GetWindowState(window)->OnWMEvent(event); | 373 wm::GetWindowState(window)->OnWMEvent(event); |
| 374 } | 374 } |
| 375 | 375 |
| 376 void WorkspaceLayoutManager::UpdateShelfVisibility() { | 376 void WorkspaceLayoutManager::UpdateShelfVisibility() { |
| 377 if (root_window_controller_->HasShelf()) | 377 root_window_controller_->wm_shelf()->UpdateVisibilityState(); |
| 378 root_window_controller_->GetShelf()->UpdateVisibilityState(); | |
| 379 } | 378 } |
| 380 | 379 |
| 381 void WorkspaceLayoutManager::UpdateFullscreenState() { | 380 void WorkspaceLayoutManager::UpdateFullscreenState() { |
| 382 // TODO(flackr): The fullscreen state is currently tracked per workspace | 381 // TODO(flackr): The fullscreen state is currently tracked per workspace |
| 383 // but the shell notification implies a per root window state. Currently | 382 // but the shell notification implies a per root window state. Currently |
| 384 // only windows in the default workspace container will go fullscreen but | 383 // only windows in the default workspace container will go fullscreen but |
| 385 // this should really be tracked by the RootWindowController since | 384 // this should really be tracked by the RootWindowController since |
| 386 // technically any container could get a fullscreen window. | 385 // technically any container could get a fullscreen window. |
| 387 if (window_->id() != kShellWindowId_DefaultContainer) | 386 if (window_->id() != kShellWindowId_DefaultContainer) |
| 388 return; | 387 return; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 403 for (aura::Window* window : windows) { | 402 for (aura::Window* window : windows) { |
| 404 wm::WindowState* window_state = wm::GetWindowState(window); | 403 wm::WindowState* window_state = wm::GetWindowState(window); |
| 405 if (window_on_top) | 404 if (window_on_top) |
| 406 window_state->DisableAlwaysOnTop(WmWindow::Get(window_on_top)); | 405 window_state->DisableAlwaysOnTop(WmWindow::Get(window_on_top)); |
| 407 else | 406 else |
| 408 window_state->RestoreAlwaysOnTop(); | 407 window_state->RestoreAlwaysOnTop(); |
| 409 } | 408 } |
| 410 } | 409 } |
| 411 | 410 |
| 412 } // namespace ash | 411 } // namespace ash |
| OLD | NEW |