| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| 11 #include "ash/desktop_background/desktop_background_widget_controller.h" | 11 #include "ash/desktop_background/desktop_background_widget_controller.h" |
| 12 #include "ash/display/display_controller.h" | 12 #include "ash/display/display_controller.h" |
| 13 #include "ash/display/display_manager.h" | 13 #include "ash/display/display_manager.h" |
| 14 #include "ash/focus_cycler.h" | 14 #include "ash/focus_cycler.h" |
| 15 #include "ash/session_state_delegate.h" |
| 15 #include "ash/shelf/shelf_layout_manager.h" | 16 #include "ash/shelf/shelf_layout_manager.h" |
| 16 #include "ash/shelf/shelf_types.h" | 17 #include "ash/shelf/shelf_types.h" |
| 17 #include "ash/shelf/shelf_widget.h" | 18 #include "ash/shelf/shelf_widget.h" |
| 18 #include "ash/shell.h" | 19 #include "ash/shell.h" |
| 19 #include "ash/shell_delegate.h" | 20 #include "ash/shell_delegate.h" |
| 20 #include "ash/shell_factory.h" | 21 #include "ash/shell_factory.h" |
| 21 #include "ash/shell_window_ids.h" | 22 #include "ash/shell_window_ids.h" |
| 22 #include "ash/system/status_area_widget.h" | 23 #include "ash/system/status_area_widget.h" |
| 23 #include "ash/system/tray/system_tray_delegate.h" | 24 #include "ash/system/tray/system_tray_delegate.h" |
| 24 #include "ash/touch/touch_observer_hud.h" | 25 #include "ash/touch/touch_observer_hud.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 root_window_ == Shell::GetPrimaryRootWindow()) { | 284 root_window_ == Shell::GetPrimaryRootWindow()) { |
| 284 // Create Panel layout manager | 285 // Create Panel layout manager |
| 285 aura::Window* panel_container = GetContainer( | 286 aura::Window* panel_container = GetContainer( |
| 286 internal::kShellWindowId_PanelContainer); | 287 internal::kShellWindowId_PanelContainer); |
| 287 panel_layout_manager_ = | 288 panel_layout_manager_ = |
| 288 new internal::PanelLayoutManager(panel_container); | 289 new internal::PanelLayoutManager(panel_container); |
| 289 panel_container_handler_.reset( | 290 panel_container_handler_.reset( |
| 290 new ToplevelWindowEventHandler(panel_container)); | 291 new ToplevelWindowEventHandler(panel_container)); |
| 291 panel_container->SetLayoutManager(panel_layout_manager_); | 292 panel_container->SetLayoutManager(panel_layout_manager_); |
| 292 } | 293 } |
| 293 if (Shell::GetInstance()->delegate()->IsUserLoggedIn()) | 294 if (Shell::GetInstance()->session_state_delegate()->HasActiveUser()) |
| 294 shelf_->CreateLauncher(); | 295 shelf_->CreateLauncher(); |
| 295 | 296 |
| 296 InitKeyboard(); | 297 InitKeyboard(); |
| 297 } | 298 } |
| 298 | 299 |
| 299 void RootWindowController::CreateContainers() { | 300 void RootWindowController::CreateContainers() { |
| 300 CreateContainersInRootWindow(root_window_.get()); | 301 CreateContainersInRootWindow(root_window_.get()); |
| 301 | 302 |
| 302 // Create touch observer HUD if needed. HUD should be created after the | 303 // Create touch observer HUD if needed. HUD should be created after the |
| 303 // containers have been created, so that its widget can be added to them. | 304 // containers have been created, so that its widget can be added to them. |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 "OverlayContainer", | 670 "OverlayContainer", |
| 670 lock_screen_related_containers); | 671 lock_screen_related_containers); |
| 671 SetUsesScreenCoordinates(overlay_container); | 672 SetUsesScreenCoordinates(overlay_container); |
| 672 | 673 |
| 673 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, | 674 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, |
| 674 "PowerButtonAnimationContainer", root_window) ; | 675 "PowerButtonAnimationContainer", root_window) ; |
| 675 } | 676 } |
| 676 | 677 |
| 677 } // namespace internal | 678 } // namespace internal |
| 678 } // namespace ash | 679 } // namespace ash |
| OLD | NEW |