Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / athena / common / fill_layout_manager.cc
blobaa5517be129479c5aa73970454a0bc88597cfe59
1 // Copyright 2014 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.
5 #include "athena/common/fill_layout_manager.h"
7 #include "base/logging.h"
8 #include "ui/aura/window.h"
10 namespace athena {
12 FillLayoutManager::FillLayoutManager(aura::Window* container)
13 : container_(container) {
14 DCHECK(container_);
17 FillLayoutManager::~FillLayoutManager() {
20 void FillLayoutManager::OnWindowResized() {
21 gfx::Rect full_bounds = gfx::Rect(container_->bounds().size());
22 for (aura::Window::Windows::const_iterator iter =
23 container_->children().begin();
24 iter != container_->children().end();
25 ++iter) {
26 SetChildBoundsDirect(*iter, full_bounds);
30 void FillLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
31 SetChildBoundsDirect(child, (gfx::Rect(container_->bounds().size())));
34 void FillLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
36 void FillLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
38 void FillLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
39 bool visible) {
41 void FillLayoutManager::SetChildBounds(aura::Window* child,
42 const gfx::Rect& requested_bounds) {
43 // Ignore SetBounds request.
46 } // namespace athena