| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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 "ui/aura_shell/desktop_layout_manager.h" | |
| 6 | |
| 7 #include "ui/aura/window.h" | |
| 8 #include "ui/views/widget/widget.h" | |
| 9 | |
| 10 namespace aura_shell { | |
| 11 namespace internal { | |
| 12 | |
| 13 //////////////////////////////////////////////////////////////////////////////// | |
| 14 // DesktopLayoutManager, public: | |
| 15 | |
| 16 DesktopLayoutManager::DesktopLayoutManager(aura::Window* owner) | |
| 17 : owner_(owner), | |
| 18 background_widget_(NULL) { | |
| 19 } | |
| 20 | |
| 21 DesktopLayoutManager::~DesktopLayoutManager() { | |
| 22 } | |
| 23 | |
| 24 //////////////////////////////////////////////////////////////////////////////// | |
| 25 // DesktopLayoutManager, aura::LayoutManager implementation: | |
| 26 | |
| 27 void DesktopLayoutManager::OnWindowResized() { | |
| 28 gfx::Rect fullscreen_bounds = | |
| 29 gfx::Rect(owner_->bounds().width(), owner_->bounds().height()); | |
| 30 | |
| 31 aura::Window::Windows::const_iterator i; | |
| 32 for (i = owner_->children().begin(); i != owner_->children().end(); ++i) | |
| 33 (*i)->SetBounds(fullscreen_bounds); | |
| 34 | |
| 35 background_widget_->SetBounds(fullscreen_bounds); | |
| 36 } | |
| 37 | |
| 38 void DesktopLayoutManager::OnWindowAddedToLayout(aura::Window* child) { | |
| 39 } | |
| 40 | |
| 41 void DesktopLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) { | |
| 42 } | |
| 43 | |
| 44 void DesktopLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child, | |
| 45 bool visible) { | |
| 46 } | |
| 47 | |
| 48 void DesktopLayoutManager::SetChildBounds(aura::Window* child, | |
| 49 const gfx::Rect& requested_bounds) { | |
| 50 SetChildBoundsDirect(child, requested_bounds); | |
| 51 } | |
| 52 | |
| 53 } // namespace internal | |
| 54 } // namespace aura_shell | |
| OLD | NEW |