| 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 "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/screen_ash.h" | 8 #include "ash/screen_ash.h" |
| 9 #include "ash/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 10 #include "ash/wm/always_on_top_controller.h" | 11 #include "ash/wm/always_on_top_controller.h" |
| 11 #include "ash/wm/base_layout_manager.h" | 12 #include "ash/wm/base_layout_manager.h" |
| 12 #include "ash/wm/window_animations.h" | 13 #include "ash/wm/window_animations.h" |
| 13 #include "ash/wm/window_properties.h" | 14 #include "ash/wm/window_properties.h" |
| 14 #include "ash/wm/window_util.h" | 15 #include "ash/wm/window_util.h" |
| 15 #include "ash/wm/workspace/workspace.h" | 16 #include "ash/wm/workspace/workspace.h" |
| 16 #include "ash/wm/workspace/workspace_manager.h" | 17 #include "ash/wm/workspace/workspace_manager.h" |
| 17 #include "ash/wm/workspace/workspace_window_resizer.h" | 18 #include "ash/wm/workspace/workspace_window_resizer.h" |
| 18 #include "base/auto_reset.h" | 19 #include "base/auto_reset.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 workspace_, window, last_show_state, cloned_layer); | 282 workspace_, window, last_show_state, cloned_layer); |
| 282 } | 283 } |
| 283 } | 284 } |
| 284 | 285 |
| 285 void WorkspaceLayoutManager::AdjustWindowSizesForScreenChange( | 286 void WorkspaceLayoutManager::AdjustWindowSizesForScreenChange( |
| 286 AdjustWindowReason reason) { | 287 AdjustWindowReason reason) { |
| 287 // Don't do any adjustments of the insets while we are in screen locked mode. | 288 // Don't do any adjustments of the insets while we are in screen locked mode. |
| 288 // This would happen if the launcher was auto hidden before the login screen | 289 // This would happen if the launcher was auto hidden before the login screen |
| 289 // was shown and then gets shown when the login screen gets presented. | 290 // was shown and then gets shown when the login screen gets presented. |
| 290 if (reason == ADJUST_WINDOW_DISPLAY_INSETS_CHANGED && | 291 if (reason == ADJUST_WINDOW_DISPLAY_INSETS_CHANGED && |
| 291 Shell::GetInstance()->IsScreenLocked()) | 292 Shell::GetInstance()->session_state_delegate()->IsScreenLocked()) |
| 292 return; | 293 return; |
| 293 work_area_ = ScreenAsh::GetDisplayWorkAreaBoundsInParent( | 294 work_area_ = ScreenAsh::GetDisplayWorkAreaBoundsInParent( |
| 294 workspace_->window()->parent()); | 295 workspace_->window()->parent()); |
| 295 // If a user plugs an external display into a laptop running Aura the | 296 // If a user plugs an external display into a laptop running Aura the |
| 296 // display size will change. Maximized windows need to resize to match. | 297 // display size will change. Maximized windows need to resize to match. |
| 297 // We also do this when developers running Aura on a desktop manually resize | 298 // We also do this when developers running Aura on a desktop manually resize |
| 298 // the host window. | 299 // the host window. |
| 299 // We also need to do this when the work area insets changes. | 300 // We also need to do this when the work area insets changes. |
| 300 for (WindowSet::const_iterator it = windows_.begin(); | 301 for (WindowSet::const_iterator it = windows_.begin(); |
| 301 it != windows_.end(); | 302 it != windows_.end(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 } | 386 } |
| 386 return false; | 387 return false; |
| 387 } | 388 } |
| 388 | 389 |
| 389 WorkspaceManager* WorkspaceLayoutManager::workspace_manager() { | 390 WorkspaceManager* WorkspaceLayoutManager::workspace_manager() { |
| 390 return workspace_->workspace_manager(); | 391 return workspace_->workspace_manager(); |
| 391 } | 392 } |
| 392 | 393 |
| 393 } // namespace internal | 394 } // namespace internal |
| 394 } // namespace ash | 395 } // namespace ash |
| OLD | NEW |