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" |
11 #include "ash/root_window_controller.h" | 11 #include "ash/root_window_controller.h" |
12 #include "ash/screen_util.h" | 12 #include "ash/screen_util.h" |
13 #include "ash/session/session_controller.h" | 13 #include "ash/session/session_controller.h" |
14 #include "ash/shelf/wm_shelf.h" | 14 #include "ash/shelf/shelf.h" |
15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
16 #include "ash/wm/always_on_top_controller.h" | 16 #include "ash/wm/always_on_top_controller.h" |
17 #include "ash/wm/fullscreen_window_finder.h" | 17 #include "ash/wm/fullscreen_window_finder.h" |
18 #include "ash/wm/screen_pinning_controller.h" | 18 #include "ash/wm/screen_pinning_controller.h" |
19 #include "ash/wm/window_positioner.h" | 19 #include "ash/wm/window_positioner.h" |
20 #include "ash/wm/window_properties.h" | 20 #include "ash/wm/window_properties.h" |
21 #include "ash/wm/window_state.h" | 21 #include "ash/wm/window_state.h" |
22 #include "ash/wm/window_util.h" | 22 #include "ash/wm/window_util.h" |
23 #include "ash/wm/wm_event.h" | 23 #include "ash/wm/wm_event.h" |
24 #include "ash/wm/workspace/backdrop_controller.h" | 24 #include "ash/wm/workspace/backdrop_controller.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // If a user plugs an external display into a laptop running Aura the | 363 // If a user plugs an external display into a laptop running Aura the |
364 // display size will change. Maximized windows need to resize to match. | 364 // display size will change. Maximized windows need to resize to match. |
365 // We also do this when developers running Aura on a desktop manually resize | 365 // We also do this when developers running Aura on a desktop manually resize |
366 // the host window. | 366 // the host window. |
367 // We also need to do this when the work area insets changes. | 367 // We also need to do this when the work area insets changes. |
368 for (aura::Window* window : windows_) | 368 for (aura::Window* window : windows_) |
369 wm::GetWindowState(window)->OnWMEvent(event); | 369 wm::GetWindowState(window)->OnWMEvent(event); |
370 } | 370 } |
371 | 371 |
372 void WorkspaceLayoutManager::UpdateShelfVisibility() { | 372 void WorkspaceLayoutManager::UpdateShelfVisibility() { |
373 root_window_controller_->wm_shelf()->UpdateVisibilityState(); | 373 root_window_controller_->shelf()->UpdateVisibilityState(); |
374 } | 374 } |
375 | 375 |
376 void WorkspaceLayoutManager::UpdateFullscreenState() { | 376 void WorkspaceLayoutManager::UpdateFullscreenState() { |
377 // TODO(flackr): The fullscreen state is currently tracked per workspace | 377 // TODO(flackr): The fullscreen state is currently tracked per workspace |
378 // but the shell notification implies a per root window state. Currently | 378 // but the shell notification implies a per root window state. Currently |
379 // only windows in the default workspace container will go fullscreen but | 379 // only windows in the default workspace container will go fullscreen but |
380 // this should really be tracked by the RootWindowController since | 380 // this should really be tracked by the RootWindowController since |
381 // technically any container could get a fullscreen window. | 381 // technically any container could get a fullscreen window. |
382 if (window_->id() != kShellWindowId_DefaultContainer) | 382 if (window_->id() != kShellWindowId_DefaultContainer) |
383 return; | 383 return; |
(...skipping 14 matching lines...) Expand all Loading... |
398 for (aura::Window* window : windows) { | 398 for (aura::Window* window : windows) { |
399 wm::WindowState* window_state = wm::GetWindowState(window); | 399 wm::WindowState* window_state = wm::GetWindowState(window); |
400 if (window_on_top) | 400 if (window_on_top) |
401 window_state->DisableAlwaysOnTop(window_on_top); | 401 window_state->DisableAlwaysOnTop(window_on_top); |
402 else | 402 else |
403 window_state->RestoreAlwaysOnTop(); | 403 window_state->RestoreAlwaysOnTop(); |
404 } | 404 } |
405 } | 405 } |
406 | 406 |
407 } // namespace ash | 407 } // namespace ash |
OLD | NEW |