| 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/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
| 10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // work area information like WindowResizer does for the | 48 // work area information like WindowResizer does for the |
| 49 // last window location. | 49 // last window location. |
| 50 gfx::Rect display_area = Shell::GetScreen()->GetDisplayNearestWindow( | 50 gfx::Rect display_area = Shell::GetScreen()->GetDisplayNearestWindow( |
| 51 window_state->window()).bounds(); | 51 window_state->window()).bounds(); |
| 52 | 52 |
| 53 if (!display_area.Intersects(restore_bounds)) { | 53 if (!display_area.Intersects(restore_bounds)) { |
| 54 DisplayController* display_controller = | 54 DisplayController* display_controller = |
| 55 Shell::GetInstance()->display_controller(); | 55 Shell::GetInstance()->display_controller(); |
| 56 const gfx::Display& display = | 56 const gfx::Display& display = |
| 57 display_controller->GetDisplayMatching(restore_bounds); | 57 display_controller->GetDisplayMatching(restore_bounds); |
| 58 aura::RootWindow* new_root = | 58 aura::Window* new_root = |
| 59 display_controller->GetRootWindowForDisplayId(display.id()); | 59 display_controller->GetRootWindowForDisplayId(display.id()); |
| 60 if (new_root != window_state->window()->GetRootWindow()) { | 60 if (new_root != window_state->window()->GetRootWindow()) { |
| 61 aura::Window* new_container = | 61 aura::Window* new_container = |
| 62 Shell::GetContainer(new_root, window_state->window()->parent()->id()); | 62 Shell::GetContainer(new_root, window_state->window()->parent()->id()); |
| 63 new_container->AddChild(window_state->window()); | 63 new_container->AddChild(window_state->window()); |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace | 68 } // namespace |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 window_state->window(), | 382 window_state->window(), |
| 383 ScreenAsh::GetDisplayBoundsInParent( | 383 ScreenAsh::GetDisplayBoundsInParent( |
| 384 window_state->window()->parent()->parent())); | 384 window_state->window()->parent()->parent())); |
| 385 return true; | 385 return true; |
| 386 } | 386 } |
| 387 return false; | 387 return false; |
| 388 } | 388 } |
| 389 | 389 |
| 390 } // namespace internal | 390 } // namespace internal |
| 391 } // namespace ash | 391 } // namespace ash |
| OLD | NEW |