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/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/keyboard/keyboard_observer_register.h" | 9 #include "ash/keyboard/keyboard_observer_register.h" |
10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // If this is in pinned mode, then this event does not trigger the | 316 // If this is in pinned mode, then this event does not trigger the |
317 // always-on-top state change, because it is kept disabled regardless of | 317 // always-on-top state change, because it is kept disabled regardless of |
318 // the fullscreen state change. | 318 // the fullscreen state change. |
319 return; | 319 return; |
320 } | 320 } |
321 | 321 |
322 UpdateAlwaysOnTop(is_fullscreen_ ? wm::GetWindowForFullscreenMode(window_) | 322 UpdateAlwaysOnTop(is_fullscreen_ ? wm::GetWindowForFullscreenMode(window_) |
323 : nullptr); | 323 : nullptr); |
324 } | 324 } |
325 | 325 |
326 void WorkspaceLayoutManager::OnPinnedStateChanged(WmWindow* pinned_window) { | 326 void WorkspaceLayoutManager::OnPinnedStateChanged(aura::Window* pinned_window) { |
327 const bool is_pinned = Shell::Get()->screen_pinning_controller()->IsPinned(); | 327 const bool is_pinned = Shell::Get()->screen_pinning_controller()->IsPinned(); |
328 if (!is_pinned && is_fullscreen_) { | 328 if (!is_pinned && is_fullscreen_) { |
329 // On exiting from pinned mode, if the workspace is still in fullscreen | 329 // On exiting from pinned mode, if the workspace is still in fullscreen |
330 // mode, then this event does not trigger the restoring yet. On exiting | 330 // mode, then this event does not trigger the restoring yet. On exiting |
331 // from fullscreen, the temporarily disabled always-on-top property will be | 331 // from fullscreen, the temporarily disabled always-on-top property will be |
332 // restored. | 332 // restored. |
333 return; | 333 return; |
334 } | 334 } |
335 | 335 |
336 UpdateAlwaysOnTop(is_pinned ? pinned_window->aura_window() : nullptr); | 336 UpdateAlwaysOnTop(is_pinned ? pinned_window : nullptr); |
337 } | 337 } |
338 | 338 |
339 void WorkspaceLayoutManager::OnVirtualKeyboardStateChanged( | 339 void WorkspaceLayoutManager::OnVirtualKeyboardStateChanged( |
340 bool activated, | 340 bool activated, |
341 aura::Window* root_window) { | 341 aura::Window* root_window) { |
342 UpdateKeyboardObserverFromStateChanged(activated, root_window, root_window_, | 342 UpdateKeyboardObserverFromStateChanged(activated, root_window, root_window_, |
343 &keyboard_observer_); | 343 &keyboard_observer_); |
344 } | 344 } |
345 | 345 |
346 ////////////////////////////////////////////////////////////////////////////// | 346 ////////////////////////////////////////////////////////////////////////////// |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 for (aura::Window* window : windows) { | 398 for (aura::Window* window : windows) { |
399 wm::WindowState* window_state = wm::GetWindowState(window); | 399 wm::WindowState* window_state = wm::GetWindowState(window); |
400 if (window_on_top) | 400 if (window_on_top) |
401 window_state->DisableAlwaysOnTop(window_on_top); | 401 window_state->DisableAlwaysOnTop(window_on_top); |
402 else | 402 else |
403 window_state->RestoreAlwaysOnTop(); | 403 window_state->RestoreAlwaysOnTop(); |
404 } | 404 } |
405 } | 405 } |
406 | 406 |
407 } // namespace ash | 407 } // namespace ash |
OLD | NEW |