| 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 return; | 629 return; |
| 630 | 630 |
| 631 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 631 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 632 if (command_line->HasSwitch(switches::kAshTouchHud)) | 632 if (command_line->HasSwitch(switches::kAshTouchHud)) |
| 633 set_touch_hud_debug(new TouchHudDebug(GetRootWindow())); | 633 set_touch_hud_debug(new TouchHudDebug(GetRootWindow())); |
| 634 if (Shell::Get()->is_touch_hud_projection_enabled()) | 634 if (Shell::Get()->is_touch_hud_projection_enabled()) |
| 635 EnableTouchHudProjection(); | 635 EnableTouchHudProjection(); |
| 636 } | 636 } |
| 637 | 637 |
| 638 aura::Window* RootWindowController::GetWindowForFullscreenMode() { | 638 aura::Window* RootWindowController::GetWindowForFullscreenMode() { |
| 639 return WmWindow::GetAuraWindow( | 639 return wm::GetWindowForFullscreenMode(GetRootWindow()); |
| 640 wm::GetWindowForFullscreenMode(WmWindow::Get(GetRootWindow()))); | |
| 641 } | 640 } |
| 642 | 641 |
| 643 void RootWindowController::ActivateKeyboard( | 642 void RootWindowController::ActivateKeyboard( |
| 644 keyboard::KeyboardController* keyboard_controller) { | 643 keyboard::KeyboardController* keyboard_controller) { |
| 645 if (!keyboard::IsKeyboardEnabled() || | 644 if (!keyboard::IsKeyboardEnabled() || |
| 646 GetContainer(kShellWindowId_VirtualKeyboardContainer)) { | 645 GetContainer(kShellWindowId_VirtualKeyboardContainer)) { |
| 647 return; | 646 return; |
| 648 } | 647 } |
| 649 DCHECK(keyboard_controller); | 648 DCHECK(keyboard_controller); |
| 650 Shell::Get()->NotifyVirtualKeyboardActivated(true, | 649 Shell::Get()->NotifyVirtualKeyboardActivated(true, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 | 792 |
| 794 void RootWindowController::InitLayoutManagers() { | 793 void RootWindowController::InitLayoutManagers() { |
| 795 // Create the shelf and status area widgets. | 794 // Create the shelf and status area widgets. |
| 796 DCHECK(!wm_shelf_->shelf_widget()); | 795 DCHECK(!wm_shelf_->shelf_widget()); |
| 797 GetShelf()->CreateShelfWidget(GetWindow()); | 796 GetShelf()->CreateShelfWidget(GetWindow()); |
| 798 | 797 |
| 799 WmWindow* root = GetWindow(); | 798 WmWindow* root = GetWindow(); |
| 800 root_window_layout_manager_ = new wm::RootWindowLayoutManager(root); | 799 root_window_layout_manager_ = new wm::RootWindowLayoutManager(root); |
| 801 root->SetLayoutManager(base::WrapUnique(root_window_layout_manager_)); | 800 root->SetLayoutManager(base::WrapUnique(root_window_layout_manager_)); |
| 802 | 801 |
| 803 WmWindow* default_container = GetWmContainer(kShellWindowId_DefaultContainer); | 802 aura::Window* default_container = |
| 803 GetContainer(kShellWindowId_DefaultContainer); |
| 804 // Installs WorkspaceLayoutManager on |default_container|. | 804 // Installs WorkspaceLayoutManager on |default_container|. |
| 805 workspace_controller_.reset(new WorkspaceController(default_container)); | 805 workspace_controller_.reset(new WorkspaceController(default_container)); |
| 806 | 806 |
| 807 WmWindow* modal_container = | 807 WmWindow* modal_container = |
| 808 GetWmContainer(kShellWindowId_SystemModalContainer); | 808 GetWmContainer(kShellWindowId_SystemModalContainer); |
| 809 DCHECK(modal_container); | 809 DCHECK(modal_container); |
| 810 modal_container->SetLayoutManager( | 810 modal_container->SetLayoutManager( |
| 811 base::MakeUnique<SystemModalContainerLayoutManager>(modal_container)); | 811 base::MakeUnique<SystemModalContainerLayoutManager>(modal_container)); |
| 812 | 812 |
| 813 WmWindow* lock_modal_container = | 813 WmWindow* lock_modal_container = |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 EnableTouchHudProjection(); | 1105 EnableTouchHudProjection(); |
| 1106 else | 1106 else |
| 1107 DisableTouchHudProjection(); | 1107 DisableTouchHudProjection(); |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1110 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1111 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1111 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 } // namespace ash | 1114 } // namespace ash |
| OLD | NEW |