blob: aa5517be129479c5aa73970454a0bc88597cfe59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "athena/common/fill_layout_manager.h"
#include "base/logging.h"
#include "ui/aura/window.h"
namespace athena {
FillLayoutManager::FillLayoutManager(aura::Window* container)
: container_(container) {
DCHECK(container_);
}
FillLayoutManager::~FillLayoutManager() {
}
void FillLayoutManager::OnWindowResized() {
gfx::Rect full_bounds = gfx::Rect(container_->bounds().size());
for (aura::Window::Windows::const_iterator iter =
container_->children().begin();
iter != container_->children().end();
++iter) {
SetChildBoundsDirect(*iter, full_bounds);
}
}
void FillLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
SetChildBoundsDirect(child, (gfx::Rect(container_->bounds().size())));
}
void FillLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
}
void FillLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
}
void FillLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child,
bool visible) {
}
void FillLayoutManager::SetChildBounds(aura::Window* child,
const gfx::Rect& requested_bounds) {
// Ignore SetBounds request.
}
} // namespace athena
|