| 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 WmWindow* window_container = wm::GetContainerForWindow(window); | 392 WmWindow* window_container = wm::GetContainerForWindow(window); |
| 393 if (window_container && | 393 if (window_container && |
| 394 window_container->GetShellWindowId() >= | 394 window_container->GetShellWindowId() >= |
| 395 kShellWindowId_LockScreenContainer) { | 395 kShellWindowId_LockScreenContainer) { |
| 396 modal_container = GetWmContainer(kShellWindowId_LockSystemModalContainer); | 396 modal_container = GetWmContainer(kShellWindowId_LockSystemModalContainer); |
| 397 } else { | 397 } else { |
| 398 modal_container = GetWmContainer(kShellWindowId_SystemModalContainer); | 398 modal_container = GetWmContainer(kShellWindowId_SystemModalContainer); |
| 399 } | 399 } |
| 400 } else { | 400 } else { |
| 401 int modal_window_id = | 401 int modal_window_id = |
| 402 WmShell::Get()->session_controller()->IsUserSessionBlocked() | 402 Shell::Get()->session_controller()->IsUserSessionBlocked() |
| 403 ? kShellWindowId_LockSystemModalContainer | 403 ? kShellWindowId_LockSystemModalContainer |
| 404 : kShellWindowId_SystemModalContainer; | 404 : kShellWindowId_SystemModalContainer; |
| 405 modal_container = GetWmContainer(modal_window_id); | 405 modal_container = GetWmContainer(modal_window_id); |
| 406 } | 406 } |
| 407 return modal_container ? static_cast<SystemModalContainerLayoutManager*>( | 407 return modal_container ? static_cast<SystemModalContainerLayoutManager*>( |
| 408 modal_container->GetLayoutManager()) | 408 modal_container->GetLayoutManager()) |
| 409 : nullptr; | 409 : nullptr; |
| 410 } | 410 } |
| 411 | 411 |
| 412 StatusAreaWidget* RootWindowController::GetStatusAreaWidget() { | 412 StatusAreaWidget* RootWindowController::GetStatusAreaWidget() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 426 return false; | 426 return false; |
| 427 | 427 |
| 428 // Always allow events to fall through to the virtual keyboard even if | 428 // Always allow events to fall through to the virtual keyboard even if |
| 429 // displaying a system modal dialog. | 429 // displaying a system modal dialog. |
| 430 if (IsVirtualKeyboardWindow(window)) | 430 if (IsVirtualKeyboardWindow(window)) |
| 431 return true; | 431 return true; |
| 432 | 432 |
| 433 aura::Window* blocking_container = nullptr; | 433 aura::Window* blocking_container = nullptr; |
| 434 | 434 |
| 435 int modal_container_id = 0; | 435 int modal_container_id = 0; |
| 436 if (WmShell::Get()->session_controller()->IsUserSessionBlocked()) { | 436 if (Shell::Get()->session_controller()->IsUserSessionBlocked()) { |
| 437 blocking_container = | 437 blocking_container = |
| 438 GetContainer(kShellWindowId_LockScreenContainersContainer); | 438 GetContainer(kShellWindowId_LockScreenContainersContainer); |
| 439 modal_container_id = kShellWindowId_LockSystemModalContainer; | 439 modal_container_id = kShellWindowId_LockSystemModalContainer; |
| 440 } else { | 440 } else { |
| 441 modal_container_id = kShellWindowId_SystemModalContainer; | 441 modal_container_id = kShellWindowId_SystemModalContainer; |
| 442 } | 442 } |
| 443 aura::Window* modal_container = GetContainer(modal_container_id); | 443 aura::Window* modal_container = GetContainer(modal_container_id); |
| 444 SystemModalContainerLayoutManager* modal_layout_manager = nullptr; | 444 SystemModalContainerLayoutManager* modal_layout_manager = nullptr; |
| 445 modal_layout_manager = static_cast<SystemModalContainerLayoutManager*>( | 445 modal_layout_manager = static_cast<SystemModalContainerLayoutManager*>( |
| 446 WmWindow::Get(modal_container)->GetLayoutManager()); | 446 WmWindow::Get(modal_container)->GetLayoutManager()); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 shell->AddShellObserver(this); | 771 shell->AddShellObserver(this); |
| 772 | 772 |
| 773 root_window_layout_manager_->OnWindowResized(); | 773 root_window_layout_manager_->OnWindowResized(); |
| 774 if (root_window_type == RootWindowType::PRIMARY) { | 774 if (root_window_type == RootWindowType::PRIMARY) { |
| 775 if (!wm_shell->IsRunningInMash()) | 775 if (!wm_shell->IsRunningInMash()) |
| 776 shell->InitKeyboard(); | 776 shell->InitKeyboard(); |
| 777 } else { | 777 } else { |
| 778 window_tree_host_->Show(); | 778 window_tree_host_->Show(); |
| 779 | 779 |
| 780 // Create a shelf if a user is already logged in. | 780 // Create a shelf if a user is already logged in. |
| 781 if (wm_shell->session_controller()->NumberOfLoggedInUsers()) | 781 if (shell->session_controller()->NumberOfLoggedInUsers()) |
| 782 CreateShelfView(); | 782 CreateShelfView(); |
| 783 | 783 |
| 784 // Notify shell observers about new root window. | 784 // Notify shell observers about new root window. |
| 785 shell->OnRootWindowAdded(WmWindow::Get(root_window)); | 785 shell->OnRootWindowAdded(WmWindow::Get(root_window)); |
| 786 } | 786 } |
| 787 | 787 |
| 788 // TODO: AshTouchExplorationManager doesn't work with mus. | 788 // TODO: AshTouchExplorationManager doesn't work with mus. |
| 789 // http://crbug.com/679782 | 789 // http://crbug.com/679782 |
| 790 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 790 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 791 switches::kAshDisableTouchExplorationMode) && | 791 switches::kAshDisableTouchExplorationMode) && |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 EnableTouchHudProjection(); | 1102 EnableTouchHudProjection(); |
| 1103 else | 1103 else |
| 1104 DisableTouchHudProjection(); | 1104 DisableTouchHudProjection(); |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1107 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1108 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1108 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 } // namespace ash | 1111 } // namespace ash |
| OLD | NEW |