summaryrefslogtreecommitdiffstats
path: root/ash/wm/base_layout_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/wm/base_layout_manager.cc')
-rw-r--r--ash/wm/base_layout_manager.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc
index 7fc116d..6a5e5e4 100644
--- a/ash/wm/base_layout_manager.cc
+++ b/ash/wm/base_layout_manager.cc
@@ -20,6 +20,7 @@ namespace internal {
// BaseLayoutManager, public:
BaseLayoutManager::BaseLayoutManager() {
+ Shell::GetInstance()->AddShellObserver(this);
Shell::GetRootWindow()->AddRootWindowObserver(this);
}
@@ -27,6 +28,7 @@ BaseLayoutManager::~BaseLayoutManager() {
for (WindowSet::const_iterator i = windows_.begin(); i != windows_.end(); ++i)
(*i)->RemoveObserver(this);
Shell::GetRootWindow()->RemoveRootWindowObserver(this);
+ Shell::GetInstance()->RemoveShellObserver(this);
}
/////////////////////////////////////////////////////////////////////////////
@@ -70,6 +72,9 @@ void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) {
AdjustWindowSizesForScreenChange();
}
+/////////////////////////////////////////////////////////////////////////////
+// BaseLayoutManager, ash::ShellObserver overrides:
+
void BaseLayoutManager::OnScreenWorkAreaInsetsChanged() {
AdjustWindowSizesForScreenChange();
}