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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
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 "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
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
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
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698