| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ash/wm/root_window_layout_manager.h" | |
| 6 | |
| 7 #include "ash/common/wm/wm_window.h" | |
| 8 #include "ash/common/wm/wm_window_tracker.h" | |
| 9 | |
| 10 namespace ash { | |
| 11 namespace wm { | |
| 12 | |
| 13 //////////////////////////////////////////////////////////////////////////////// | |
| 14 // RootWindowLayoutManager, public: | |
| 15 | |
| 16 RootWindowLayoutManager::RootWindowLayoutManager(WmWindow* owner) | |
| 17 : owner_(owner) {} | |
| 18 | |
| 19 RootWindowLayoutManager::~RootWindowLayoutManager() {} | |
| 20 | |
| 21 //////////////////////////////////////////////////////////////////////////////// | |
| 22 // RootWindowLayoutManager, aura::LayoutManager implementation: | |
| 23 | |
| 24 void RootWindowLayoutManager::OnWindowResized() { | |
| 25 const gfx::Rect fullscreen_bounds = gfx::Rect(owner_->GetBounds().size()); | |
| 26 | |
| 27 // Resize both our immediate children (the containers-of-containers animated | |
| 28 // by PowerButtonController) and their children (the actual containers). | |
| 29 WmWindowTracker children_tracker(owner_->GetChildren()); | |
| 30 while (!children_tracker.windows().empty()) { | |
| 31 WmWindow* child = children_tracker.Pop(); | |
| 32 child->SetBounds(fullscreen_bounds); | |
| 33 WmWindowTracker grandchildren_tracker(child->GetChildren()); | |
| 34 while (!grandchildren_tracker.windows().empty()) | |
| 35 grandchildren_tracker.Pop()->SetBounds(fullscreen_bounds); | |
| 36 } | |
| 37 } | |
| 38 | |
| 39 void RootWindowLayoutManager::OnWindowAddedToLayout(WmWindow* child) {} | |
| 40 | |
| 41 void RootWindowLayoutManager::OnWillRemoveWindowFromLayout(WmWindow* child) {} | |
| 42 | |
| 43 void RootWindowLayoutManager::OnWindowRemovedFromLayout(WmWindow* child) {} | |
| 44 | |
| 45 void RootWindowLayoutManager::OnChildWindowVisibilityChanged(WmWindow* child, | |
| 46 bool visible) {} | |
| 47 | |
| 48 void RootWindowLayoutManager::SetChildBounds( | |
| 49 WmWindow* child, | |
| 50 const gfx::Rect& requested_bounds) { | |
| 51 child->SetBoundsDirect(requested_bounds); | |
| 52 } | |
| 53 | |
| 54 } // namespace wm | |
| 55 } // namespace ash | |
| OLD | NEW |