| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ///////////////////////////////////////////////////////////////////////////// | 68 ///////////////////////////////////////////////////////////////////////////// |
| 69 // BaseLayoutManager, RootWindowObserver overrides: | 69 // BaseLayoutManager, RootWindowObserver overrides: |
| 70 | 70 |
| 71 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) { | 71 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) { |
| 72 AdjustWindowSizesForScreenChange(); | 72 AdjustWindowSizesForScreenChange(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 ///////////////////////////////////////////////////////////////////////////// | 75 ///////////////////////////////////////////////////////////////////////////// |
| 76 // BaseLayoutManager, ash::ShellObserver overrides: | 76 // BaseLayoutManager, ash::ShellObserver overrides: |
| 77 | 77 |
| 78 void BaseLayoutManager::OnScreenWorkAreaInsetsChanged() { | 78 void BaseLayoutManager::OnMonitorWorkAreaInsetsChanged() { |
| 79 AdjustWindowSizesForScreenChange(); | 79 AdjustWindowSizesForScreenChange(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 ///////////////////////////////////////////////////////////////////////////// | 82 ///////////////////////////////////////////////////////////////////////////// |
| 83 // BaseLayoutManager, WindowObserver overrides: | 83 // BaseLayoutManager, WindowObserver overrides: |
| 84 | 84 |
| 85 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window, | 85 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window, |
| 86 const void* key, | 86 const void* key, |
| 87 intptr_t old) { | 87 intptr_t old) { |
| 88 if (key == aura::client::kShowStateKey) | 88 if (key == aura::client::kShowStateKey) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ? | 131 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ? |
| 132 gfx::Screen::GetMonitorAreaNearestWindow(window) : | 132 gfx::Screen::GetMonitorAreaNearestWindow(window) : |
| 133 gfx::Screen::GetMonitorWorkAreaNearestWindow(window); | 133 gfx::Screen::GetMonitorWorkAreaNearestWindow(window); |
| 134 // Put as much of the window as possible within the monitor area. | 134 // Put as much of the window as possible within the monitor area. |
| 135 window->SetBounds(window->bounds().AdjustToFit(monitor_rect)); | 135 window->SetBounds(window->bounds().AdjustToFit(monitor_rect)); |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace internal | 139 } // namespace internal |
| 140 } // namespace ash | 140 } // namespace ash |
| OLD | NEW |