This source file includes following definitions.
- shelf_
- OnWindowResized
- OnWindowAddedToLayout
- OnWillRemoveWindowFromLayout
- OnWindowRemovedFromLayout
- OnChildWindowVisibilityChanged
- SetChildBounds
- LayoutStatusArea
#include "ash/wm/status_area_layout_manager.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/system/status_area_widget.h"
#include "base/auto_reset.h"
#include "ui/aura/window.h"
#include "ui/views/widget/widget.h"
namespace ash {
StatusAreaLayoutManager::StatusAreaLayoutManager(ShelfWidget* shelf)
: in_layout_(false),
shelf_(shelf) {
}
StatusAreaLayoutManager::~StatusAreaLayoutManager() {
}
void StatusAreaLayoutManager::OnWindowResized() {
LayoutStatusArea();
}
void StatusAreaLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
}
void StatusAreaLayoutManager::OnWillRemoveWindowFromLayout(
aura::Window* child) {
}
void StatusAreaLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
}
void StatusAreaLayoutManager::OnChildWindowVisibilityChanged(
aura::Window* child, bool visible) {
}
void StatusAreaLayoutManager::SetChildBounds(
aura::Window* child,
const gfx::Rect& requested_bounds) {
if (child != shelf_->status_area_widget()->GetNativeView() || in_layout_) {
SetChildBoundsDirect(child, requested_bounds);
return;
}
if (requested_bounds == child->bounds())
return;
SetChildBoundsDirect(child, requested_bounds);
LayoutStatusArea();
}
void StatusAreaLayoutManager::LayoutStatusArea() {
if (shelf_->shelf_layout_manager()->updating_bounds())
return;
base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
shelf_->shelf_layout_manager()->LayoutShelf();
}
}