| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/base_layout_manager.h" | 5 #include "ash/wm/base_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm/property_util.h" | 8 #include "ash/wm/property_util.h" |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 ///////////////////////////////////////////////////////////////////////////// | 69 ///////////////////////////////////////////////////////////////////////////// |
| 70 // BaseLayoutManager, RootWindowObserver overrides: | 70 // BaseLayoutManager, RootWindowObserver overrides: |
| 71 | 71 |
| 72 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) { | 72 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) { |
| 73 AdjustWindowSizesForScreenChange(); | 73 AdjustWindowSizesForScreenChange(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 ///////////////////////////////////////////////////////////////////////////// | 76 ///////////////////////////////////////////////////////////////////////////// |
| 77 // BaseLayoutManager, ash::ShellObserver overrides: | 77 // BaseLayoutManager, ash::ShellObserver overrides: |
| 78 | 78 |
| 79 void BaseLayoutManager::OnScreenWorkAreaInsetsChanged() { | 79 void BaseLayoutManager::OnMonitorWorkAreaInsetsChanged() { |
| 80 AdjustWindowSizesForScreenChange(); | 80 AdjustWindowSizesForScreenChange(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 ///////////////////////////////////////////////////////////////////////////// | 83 ///////////////////////////////////////////////////////////////////////////// |
| 84 // BaseLayoutManager, WindowObserver overrides: | 84 // BaseLayoutManager, WindowObserver overrides: |
| 85 | 85 |
| 86 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window, | 86 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window, |
| 87 const void* key, | 87 const void* key, |
| 88 intptr_t old) { | 88 intptr_t old) { |
| 89 if (key == aura::client::kShowStateKey) | 89 if (key == aura::client::kShowStateKey) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ? | 132 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ? |
| 133 gfx::Screen::GetMonitorAreaNearestWindow(window) : | 133 gfx::Screen::GetMonitorAreaNearestWindow(window) : |
| 134 gfx::Screen::GetMonitorWorkAreaNearestWindow(window); | 134 gfx::Screen::GetMonitorWorkAreaNearestWindow(window); |
| 135 // Put as much of the window as possible within the monitor area. | 135 // Put as much of the window as possible within the monitor area. |
| 136 window->SetBounds(window->bounds().AdjustToFit(monitor_rect)); | 136 window->SetBounds(window->bounds().AdjustToFit(monitor_rect)); |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace internal | 140 } // namespace internal |
| 141 } // namespace ash | 141 } // namespace ash |
| OLD | NEW |