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/common/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } | 168 } |
169 } else if (window_state->HasRestoreBounds()) { | 169 } else if (window_state->HasRestoreBounds()) { |
170 // Keyboard hidden, restore original bounds if they exist. If the user has | 170 // Keyboard hidden, restore original bounds if they exist. If the user has |
171 // resized or dragged the window in the meantime, WorkspaceWindowResizer | 171 // resized or dragged the window in the meantime, WorkspaceWindowResizer |
172 // will have cleared the restore bounds and this code will not accidentally | 172 // will have cleared the restore bounds and this code will not accidentally |
173 // override user intent. | 173 // override user intent. |
174 window_state->SetAndClearRestoreBounds(); | 174 window_state->SetAndClearRestoreBounds(); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
| 178 void WorkspaceLayoutManager::OnKeyboardHidden() {} |
| 179 |
178 ////////////////////////////////////////////////////////////////////////////// | 180 ////////////////////////////////////////////////////////////////////////////// |
179 // WorkspaceLayoutManager, aura::WindowObserver implementation: | 181 // WorkspaceLayoutManager, aura::WindowObserver implementation: |
180 | 182 |
181 void WorkspaceLayoutManager::OnWindowTreeChanged( | 183 void WorkspaceLayoutManager::OnWindowTreeChanged( |
182 WmWindow* window, | 184 WmWindow* window, |
183 const WmWindowObserver::TreeChangeParams& params) { | 185 const WmWindowObserver::TreeChangeParams& params) { |
184 if (!params.target->GetWindowState()->IsActive()) | 186 if (!params.target->GetWindowState()->IsActive()) |
185 return; | 187 return; |
186 // If the window is already tracked by the workspace this update would be | 188 // If the window is already tracked by the workspace this update would be |
187 // redundant as the fullscreen and shelf state would have been handled in | 189 // redundant as the fullscreen and shelf state would have been handled in |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 for (auto* window : windows) { | 377 for (auto* window : windows) { |
376 wm::WindowState* window_state = window->GetWindowState(); | 378 wm::WindowState* window_state = window->GetWindowState(); |
377 if (window_on_top) | 379 if (window_on_top) |
378 window_state->DisableAlwaysOnTop(window_on_top); | 380 window_state->DisableAlwaysOnTop(window_on_top); |
379 else | 381 else |
380 window_state->RestoreAlwaysOnTop(); | 382 window_state->RestoreAlwaysOnTop(); |
381 } | 383 } |
382 } | 384 } |
383 | 385 |
384 } // namespace ash | 386 } // namespace ash |
OLD | NEW |